title: How can I simulate a DeviceLost event with Win2D?
body: <p>I have a <code>CanvasControl</code> in a UWP app and I've noticed when I leave my Surface alone for a while and it goes to sleep automatically, the <code>CanvasControl</code> no longer works after resuming. The previously drawn bitmap is now blank.</p>
  
  <p>I tried to simulate Suspend/Resume in Visual Studio 2015, but that doesn't seem to cause a problem. It resumes fine.</p>
  
  <p>I have a feeling it has to do with the <code>CanvasDevice.DeviceLost</code> event, and although I manage that with the <code>CanvasControl.CreateResources</code> event, I can't find a way to easily test it. </p>
  
  <p>I tried the following:</p>
  
  <pre><code>// This throws an exception. Not allowed to do this.
  myCanvas.Device.RaiseDeviceLost(); 
  
  // and this doesn't report a device lost, but myCanvas becomes unusable.
  myCanvas.Device.Dispose();
  </code></pre>
  
  <p>Is there a way to programmatically invoke a <code>CanvasDevice.DeviceLost</code> event? How can I fake it?</p>