AudioTrack.AlbumArt Property

The path to the album art for the track.

Namespace:  Microsoft.Phone.BackgroundAudio
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

public Uri AlbumArt { get; set; }
<object AlbumArt="Uri" .../>

Property Value

Type: System.Uri
Returns Uri.

ExceptionCondition
InvalidOperationException

The value was set, but the object is not in edit mode.

This URI must be created as a relative URI (UriKind.Relative).

Once set, this property can be used by the application to display the album art image.

If you copy the image file into isolated storage under the shared/media directory and set this property, the album art will automatically be displayed in the Now Playing tile in the Music + Videos Hub.

AudioTrack track = new AudioTrack();
track.AlbumArt = new Uri("shared/media/MediaImage.jpg", UriKind.Relative);
// ...

Follow the guidelines for the proper image size as documented in How to integrate with the Music and Videos Hub for Windows Phone 8. Also see the Background Audio Player Sample.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2015 Microsoft