Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AlbumCollection Class

A collection of albums in the media library.

public sealed class AlbumCollection : IEnumerable<Album>, IEnumerable, IDisposable

The AlbumCollection class provides access to albums in the device's media library.

Use the MediaLibrary.Albums property to obtain a collection of all albums in the media library, the Artist.Albums property to obtain a collection of albums associated with a particular artist, and the Genre.Albums property to obtain a collection of albums associated with a particular genre.

The AlbumCollection does not immediately instantiate instances of all albums in the collection. Instead, individual Album objects are created each time an album is accessed through the collection's Item indexer. See the Remarks section of Item for the resource implications of maintaining references to multiple Album objects.

Namespace: Microsoft.Xna.Framework.Media
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Windows Phone

Community Additions

Show:
© 2018 Microsoft