Song.FromUri Method

Constructs a new Song object based on the specified URI.

Syntax

'Declaration
Public Shared Function FromUri ( _
         name As String, _
         uri As Uri _
) As Song 
public static Song FromUri (
         string name,
         Uri uri
)
public:
static Song FromUri(
         String name,
         Uri uri
)

Parameters

  • name
    Type: String
    Name of the song.
  • uri
    Type: Uri
    Uri object that represents the URI.

Return Value

Type: Song
Song object that can be used to play the song remotely.

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_NETWORKING Windows Phone 8, Windows Phone OS 7.1

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

Requirements

Namespace: Microsoft.Xna.Framework.Media

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

See Also

Song Class
Song Members
Microsoft.Xna.Framework.Media Namespace

Platforms

Windows Phone