CanvasDeviceIsDeviceLost Method |
Namespace: Microsoft.Graphics.Canvas
public bool IsDeviceLost( int hresult )
This method expects an error code from an exception that your app has caught. IsDeviceLost will return true if the device is indeed lost, and the error code actually corresponds to device removal.
This is intended to be used like:
try { DrawStuff(); } catch (Exception e) where canvasDevice.IsDeviceLost(e.ErrorCode) { canvasDevice.RaiseDeviceLost(); }
For more information, see Handling device lost.