Brush
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Defines objects that are used to paint graphical objects.
Syntax Notes
See Derived Objects for syntax information.
Remarks
For XAML syntaxes that take a Brush object, you need to specify one of the following:
A Color object, specified as a string to directly fill a Brush-type property in XAML attribute form. The string implies a SolidColorBrush to fill the value, and the Color you specify becomes the Color (SolidColorBrush) property value.
A nonabstract derived type of Brush as an object element, with the Brush-type property specified in property element form. For more information, see the XAML syntax for the SolidColorBrush, LinearGradientBrush, RadialGradientBrush, ImageBrush, and VideoBrush objects.
A Brush paints an area with its output. The following list describes the different types of brushes:
SolidColorBrush—paints an area with a solid color.
LinearGradientBrush—paints an area with a linear gradient.
RadialGradientBrush—paints an area with a radial gradient.
ImageBrush—paints an area with an image.
VideoBrush—paints an area with a running video.
For more information on basic concepts, see Brushes. Note that the Brushes topic is written primarily for users of the managed API, and may not have code examples or specific information that address the JavaScript API scenarios.