Click to Rate and Give Feedback
MSDN
MSDN Library
XNA Game Studio
Game Class
Game Properties
 IsActive Property
Collapse All/Expand All Collapse All
XNA Game Studio 4.0 Refresh
Game.IsActive Property
Indicates whether the game is currently the active application.

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

C#
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.

On Windows Phone, the game is active if it is the current application interacting with the user, not obscured by any Guide dialogs and the phone screen is not locked.

Bb197664.bp(en-us,XNAGameStudio.41).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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker