Click or drag to resize
CanvasVirtualControlRegionsInvalidated Event
Occurs when a region of the control needs redrawing.

Namespace:  Microsoft.Graphics.Canvas.UI.Xaml
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public event TypedEventHandler<CanvasVirtualControl, CanvasRegionsInvalidatedEventArgs> RegionsInvalidated

Value

Type: Windows.FoundationTypedEventHandlerCanvasVirtualControl, CanvasRegionsInvalidatedEventArgs
Remarks

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:

C#
void OnRegionsInvalidated(CanvasVirtualControl sender, CanvasRegionsInvalidatedEventArgs args)
{
    foreach (var region in args.InvalidatedRegions)
    {
        using (var ds = sender.CreateDrawingSession(region))
        {
            // draw the region
        }
    }
}

See Also