Click or drag to resize
CanvasControlCreateResources 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:
public event TypedEventHandler<CanvasControl, CanvasCreateResourcesEventArgs> CreateResources


Type: Windows.FoundationTypedEventHandlerCanvasControl, CanvasCreateResourcesEventArgs

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