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.

MediaLibraryExtensions.Delete Method

Deletes the specified song from the specified MediaLibrary, after prompting for confirmation.

[ExtensionAttribute]
public static void Delete (
         MediaLibrary library,
         Song song
)

Parameters

library
Type: MediaLibrary
The media library from which the song is to be deleted.
song
Type: Song
The song to be deleted.

The deletion performed by this method cascades to related items. For example, if the deleted song was the last song for an album or artist, then the related album or artist is also deleted.

Capabilities for Windows Phone

If you use this API in your Windows Phone app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_MEDIALIB_AUDIOWindows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone.

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

Windows Phone

Community Additions

Show:
© 2014 Microsoft