CanvasVirtualControlRegionsInvalidated Event |
Namespace: Microsoft.Graphics.Canvas.UI.Xaml
public event TypedEventHandler<CanvasVirtualControl, CanvasRegionsInvalidatedEventArgs> RegionsInvalidated
Applications should register for this event to be notified when regions of the control should be redrawn. Typically applications will run a loop similar to this:
void OnRegionsInvalidated(CanvasVirtualControl sender, CanvasRegionsInvalidatedEventArgs args) { foreach (var region in args.InvalidatedRegions) { using (var ds = sender.CreateDrawingSession(region)) { // draw the region } } }