Click or drag to resize
CanvasVirtualControlCreateResources Event
Hook this event to create any resources needed for your drawing.

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, CanvasCreateResourcesEventArgs> CreateResources

Value

Type: Windows.FoundationTypedEventHandlerCanvasVirtualControl, CanvasCreateResourcesEventArgs
Remarks

The CreateResources event is raised once when the CanvasControl is first initialized, then again any time the resources need to be recreated, for instance if the graphics device is lost.

If your app cannot be structured in a way where it loads all of its resources at the beginning (for example, a game with multiple levels, and the levels require different assets), see Loading Resources outside of CreateResources for more information.

See Also