Gets or sets the rating associated with a music file. Gets the names of music genres that the song belongs to. Gets the duration of the song in milliseconds. Gets the artists that contributed to the song. Gets or sets the name of the album artist of the song. Gets or sets the name of the album that contains the song. For more information, see QueryOptions.įor more code samples about accessing properties, see the File access sample. ![]() Instead, you can try to get these properties using a file query that is backed by the system index. ![]() Properties that are get or set using a property handler that is defined by another app (like Microsoft Word) may not be accessible. FolderInformation.MusicProperties property.FileInformation.MusicProperties property.StorageItemContentProperties.GetMusicPropertiesAsync method, which can be accessed using the Properties property, if it is available.You can get a musicProperties object using any of the following methods and properties: You can access a MusicProperties object asynchronously using the GetMusicPropertiesAsync method from the Properties property of an item (like a file of folder), or synchronously using the MusicProperties property if it is available. In the example, file contains a StorageFile that represents the file to retrieve properties for. For example, handle a file not found errorĪfter GetMusicPropertiesAsync completes, musicProperties gets a MusicProperties object. OutputText.AppendLine("Rating: " + musicProperties.Rating) OutputText.AppendLine("Album: " + musicProperties.Album) MusicProperties musicProperties = await () StringBuilder outputText = new StringBuilder() ![]() This example demonstrates how to retrieve properties of a file, including music properties like Album and Rating.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |