Click or drag to resize
ICanvasAnimatedControlClearColor Property
The color that the control is cleared to before the Draw event is raised.

Namespace:  Microsoft.Graphics.Canvas.UI.Xaml
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version:
Color ClearColor { get; set; }

Property Value

Type: Color

ClearColor defaults to transparent black, that is, Color.FromArgb(0,0,0,0).

Modifying ClearColor will cause the control to redraw, even if Paused is set to true.

This property can be accessed from any thread.

CanvasAnimatedControl uses this ClearColor property instead of the Background property that is inherited from XAML UserControl, because Background can be set to any XAML brush object. It does not make sense to clear an immediate mode Win2D control using XAML content as the background, so CanvasAnimatedControl ignores the XAML Background setting.

See Also