Beispiel #1
0
 private void MyCanvas_RegionsInvalidated(CanvasVirtualControl sender, CanvasRegionsInvalidatedEventArgs args)
 {
     foreach (var region in args.InvalidatedRegions)
     {
         using (var ds = MyCanvas.CreateDrawingSession(region))
         {
             if (virtualBitmap != null)
             {
                 ds.DrawImage(virtualBitmap, region, region);
             }
         }
     }
 }