Bagikan melalui


MediaPlayer.GameHasControl Property

Determines whether the game has control of the background music.

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

Syntax

public static bool GameHasControl { get; }

Property Value

true if the game has control of the background music; otherwise, false.

Remarks

A gamer can play his or her own music as the background to your game by using the Xbox 360 dashboard. If the game is currently playing custom background music (specified by the gamer using the Xbox 360 dashboard), calls to Play, Stop, Pause, Resume, MoveNext, and MovePrevious have no effect.

If another application's background music is playing, your game will need to call in order to pause the other application's background music in order to play the game's music.

See Also

Reference

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

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone