Game.IsActive Property

Indicates whether the game is currently the active application.

Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework.Game (in

public bool IsActive { get; }

Property Value

true if the game is active; false otherwise.

On Windows, a game is active if it is not minimized and has the current input focus. On Xbox 360, the game is active if the user is not interacting with the Guide or Dashboard.

Bb197664.bp(en-us,XNAGameStudio.40).gifBest Practice
It is generally a good idea to pause the game when Game.IsActive is false.

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

Community Additions