Brush Object (Abstract)
Defines objects used to paint graphical objects.
XAML |
Must use derived objects.
|
Scripting |
Must use derived objects.
|
Properties
Name, Opacity, RelativeTransform, Transform
Methods
Equals, FindName, GetHost, GetValue, SetValue
Derived Objects
ImageBrush, LinearGradientBrush, RadialGradientBrush, SolidColorBrush, VideoBrush
Remarks
For XAML syntaxes that take a Brush, you need to specify one of the following:
- A Color, specified as a string to directly fill a Brush-type property in XAML attribute form. That string is implied to create a SolidColorBrush to fill the value, and the Color you specify becomes the SolidColorBrush.Color property value.
- A nonabstract derived type of Brush as an object element, with the Brush-type property in question being specified in property element form. For details, see the XAML syntax on the reference pages for SolidColorBrush, LinearGradientBrush, RadialGradientBrush, ImageBrush, and VideoBrush.
For more information and examples of the XAML syntax and illustrations of the types of brushes, see Brush Overview.
A Brush "paints" an area with its output. Different brushes have different types of output. Some brushes paint an area with a solid color, gradient, or image. 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.