O'Reilly logo

Microsoft® Silverlight® Edition: Programming Windows® Phone 7 by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The XNA Music Classes: MediaLibrary

An application that wants to play music under Windows Phone 7 uses classes from the Microsoft.Xna.Framework.Media namespace. You’ll first need to access the music from the library, and for that you’ll need a new instance of MediaLibrary, the same class you use to access the photo library.

The MediaLibrary class defines several get-only properties that let you access the music library in several standard ways. These properties include:

  • Albums of type AlbumCollection, a collection of Album objects.

  • Songs of type SongCollection, a collection of Song objects.

  • Artists of type ArtistCollection, a collection of Artist objects.

  • Genres of type GenreCollection, a collection of Genre objects.

Each of these collections contains ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required