CanvasAnimatedControl Class |
Namespace: Microsoft.Graphics.Canvas.UI.Xaml
public sealed class CanvasAnimatedControl : UserControl, IAnimationObject, IVisualElement, ICanvasAnimatedControl, ICanvasResourceCreatorWithDpi, ICanvasResourceCreator
The CanvasAnimatedControl type exposes the following members.
Name | Description | |
---|---|---|
CanvasAnimatedControl | Initializes a new instance of the CanvasAnimatedControl class. |
Name | Description | |
---|---|---|
ClearColor | The color that the control is cleared to before the Draw event is raised. | |
CustomDevice | Gets or sets an application-chosen device for this control. | |
Device | Gets the underlying device used by this control. | |
Dpi | Gets the current dots-per-inch (DPI) of this control. | |
DpiScale | Gets or sets a scaling factor applied to this control's Dpi. | |
ForceSoftwareRenderer | Gets or sets the whether the devices that this control creates will be forced to software rendering. | |
HasGameLoopThreadAccess | Gets whether the current thread is the game loop thread. | |
IsFixedTimeStep | Indicates whether the game loop is running in fixed or variable timing mode. | |
Paused | Indicates whether the control's game loop is paused. | |
ReadyToDraw | Gets whether the control is in a state where it is ready to draw. | |
Size | Gets the current size of the control, in device independent pixels (DIPs). | |
TargetElapsedTime | Gets or sets the time between Update events | |
UseSharedDevice | Gets or sets whether this control should create a new device each time, or use a device which may common between other controls. |
Name | Description | |
---|---|---|
ConvertDipsToPixels | Converts units from device independent pixels (DIPs) to physical pixels based on the current DPI of this control. | |
ConvertPixelsToDips | Converts units from physical pixels to device independent pixels (DIPs) based on the current DPI of this control. | |
CreateCoreIndependentInputSource | Creates an input source that can process input on a non-UI thread (such as the game loop thread). | |
Invalidate | Marks this control as requiring redrawing. | |
RemoveFromVisualTree | Removes the control from the last FrameworkElement it was parented to. | |
ResetElapsedTime | Ensures that only a single Update event will be raised on the next iteration of the game loop. | |
RunOnGameLoopThreadAsync | Schedules the provided callback to run asynchronously on the game loop thread. |
Name | Description | |
---|---|---|
CreateResources | Hook this event to create any resources needed for your drawing. | |
Draw | Hook this event to draw the contents of the control. | |
GameLoopStarting | Occurs on the game loop thread just before the game loop starts. | |
GameLoopStopped | Occurs on the game loop thread just after the game loop stops. | |
Update | Hook this event to update any data, as necessary, for your app's animation. |
CanvasAnimatedControl is currently unsupported for WinUI3