Click or drag to resize
CanvasControlDraw Event
This is where the magic happens! Hook this event to issue your immediate mode 2D drawing calls.

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<CanvasControl, CanvasDrawEventArgs> Draw

Value

Type: Windows.FoundationTypedEventHandlerCanvasControl, CanvasDrawEventArgs
Remarks

The Draw event is raised once when the CanvasControl first becomes visible, then again any time its contents need to be redrawn. This can occur, for example, if the control is resized. You can manually trigger a Draw event yourself by calling Invalidate.

If you want to animate the contents of a CanvasControl, you should use CanvasAnimatedControl instead. CanvasAnimatedControl raises the Draw event on a configurable interval; by default this is 60 times per second.

See Also