Class MediaLibrary
Provides access to songs, playlists, and pictures in the device's media library.
public class MediaLibrary : IDisposable
- Inheritance
-
MediaLibrary
- Implements
- Inherited Members
Remarks
MediaLibrary provides the following properties that return media collections: Albums, Songs. Each property returns a collection object that can be enumerated and indexed. The collection object represents all media of that type in the device's media library.
Constructors
MediaLibrary()
Creates a new instance of MediaLibrary.
public MediaLibrary()
MediaLibrary(MediaSource)
Creates a new instance of MediaLibrary from a supplie MediaSource.
public MediaLibrary(MediaSource mediaSource)
Parameters
mediaSourceMediaSource
Remarks
Current implenetation will always throw NotSupportedException
Properties
Albums
Gets the AlbumCollection that contains all albums in the media library.
public AlbumCollection Albums { get; }
Property Value
IsDisposed
Gets a value indicating whether the object is disposed.
public bool IsDisposed { get; }
Property Value
MediaSource
Gets the MediaSource with which this media library was constructed.
public MediaSource MediaSource { get; }
Property Value
Songs
Gets the SongCollection that contains all songs in the media library.
public SongCollection Songs { get; }
Property Value
Methods
Dispose()
Immediately releases the unmanaged resources used by this object.
public void Dispose()
Load(Action<int>)
Load the contents of MediaLibrary. This blocking call might take up to a few minutes depending on the platform and the size of the user's music library.
public void Load(Action<int> progressCallback = null)