Click or drag to resize
CanvasAnimatedControl Class
XAML control intended for displaying animating content. Currently unsupported for WinUI3.
Inheritance Hierarchy
SystemObject
  Windows.UI.Xaml.ControlsUserControl
    Microsoft.Graphics.Canvas.UI.XamlCanvasAnimatedControl

Namespace:  Microsoft.Graphics.Canvas.UI.Xaml
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public sealed class CanvasAnimatedControl : UserControl, 
	IAnimationObject, IVisualElement, ICanvasAnimatedControl, ICanvasResourceCreatorWithDpi, ICanvasResourceCreator

The CanvasAnimatedControl type exposes the following members.

Constructors
  NameDescription
Public methodCanvasAnimatedControl
Initializes a new instance of the CanvasAnimatedControl class.
Top
Properties
  NameDescription
Public propertyClearColor
The color that the control is cleared to before the Draw event is raised.
Public propertyCustomDevice
Gets or sets an application-chosen device for this control.
Public propertyDevice
Gets the underlying device used by this control.
Public propertyDpi
Gets the current dots-per-inch (DPI) of this control.
Public propertyDpiScale
Gets or sets a scaling factor applied to this control's Dpi.
Public propertyForceSoftwareRenderer
Gets or sets the whether the devices that this control creates will be forced to software rendering.
Public propertyHasGameLoopThreadAccess
Gets whether the current thread is the game loop thread.
Public propertyIsFixedTimeStep
Indicates whether the game loop is running in fixed or variable timing mode.
Public propertyPaused
Indicates whether the control's game loop is paused.
Public propertyReadyToDraw
Gets whether the control is in a state where it is ready to draw.
Public propertySize
Gets the current size of the control, in device independent pixels (DIPs).
Public propertyTargetElapsedTime
Gets or sets the time between Update events
Public propertyUseSharedDevice
Gets or sets whether this control should create a new device each time, or use a device which may common between other controls.
Top
Methods
  NameDescription
Public methodConvertDipsToPixels
Converts units from device independent pixels (DIPs) to physical pixels based on the current DPI of this control.
Public methodConvertPixelsToDips
Converts units from physical pixels to device independent pixels (DIPs) based on the current DPI of this control.
Public methodCreateCoreIndependentInputSource
Creates an input source that can process input on a non-UI thread (such as the game loop thread).
Public methodInvalidate
Marks this control as requiring redrawing.
Public methodRemoveFromVisualTree
Removes the control from the last FrameworkElement it was parented to.
Public methodResetElapsedTime
Ensures that only a single Update event will be raised on the next iteration of the game loop.
Public methodRunOnGameLoopThreadAsync
Schedules the provided callback to run asynchronously on the game loop thread.
Top
Events
  NameDescription
Public eventCreateResources
Hook this event to create any resources needed for your drawing.
Public eventDraw
Hook this event to draw the contents of the control.
Public eventGameLoopStarting
Occurs on the game loop thread just before the game loop starts.
Public eventGameLoopStopped
Occurs on the game loop thread just after the game loop stops.
Public eventUpdate
Hook this event to update any data, as necessary, for your app's animation.
Top
Remarks

CanvasAnimatedControl is currently unsupported for WinUI3

See Also