Game.GraphicsDevice Property

Gets the current GraphicsDevice.

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

public GraphicsDevice GraphicsDevice { get; }

Property Value

The current GraphicsDevice.

Exception typeCondition
InvalidOperationExceptionThis property requires a graphics device service in the game service container.

Do not access this property until LoadContent is called.

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