Share via


GraphicsDevice.DeviceLost Event

Occurs when a GraphicsDevice is about to be lost (for example, immediately before a reset).

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

Syntax

public event EventHandler<EventArgs> DeviceLost

Example

To add an event handler that listens for DeviceLost, use the following C# code.

      [C#]
      GraphicsDevice.DeviceLost += new System.EventHandler( this.GraphicsDeviceLostEventHandler );
    

See Also

Reference

GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows 7, Windows Vista, Windows XP