GraphicsDeviceManager.ToggleFullScreen Method
Toggles between full screen and windowed mode.
Namespace: Microsoft.Xna.Framework
Assembly: Microsoft.Xna.Framework.Game (in microsoft.xna.framework.game.dll)
Syntax
public void ToggleFullScreen ()
Exceptions
Exception type | Condition |
---|---|
NoSuitableGraphicsDeviceException | One of the following conditions has occurred:
|
InvalidOperationException | This graphics device manager has not been added to Services and registered as the graphics device manager for the application. Device settings cannot be changed or committed unless the device has been registered. |
ArgumentException | Full-screen mode is not compatible with the current back buffer settings:
IsFullScreen is true, but:
IsFullScreen is false, but:
|
Remarks
This method has no effect on the Xbox 360.
See Also
Reference
GraphicsDeviceManager Class
GraphicsDeviceManager Members
Microsoft.Xna.Framework Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP