Brush class
Defines objects used to paint graphical objects. Classes that derive from Brush describe how the area is painted.
Inheritance
- Object
- DependencyObject
- Brush
Syntax
<object property="predefinedColorName"/> - or - <object property="#rgb"/> - or - <object property="#argb"/> - or - <object property="#rrggbb"/> - or - <object property="#aarrggbb"/> - or - <object property="sc#scR,scG,scB"/> - or - <object property="sc#scA,scR,scG,scB"/>
XAML Values
- predefinedColorName
-
The name of a color. This can either be a static property name of Colors, or one of the color names that are processed directly as strings.
- rgb
-
A three-character hexadecimal value that describes a Color. The first character specifies the color's Color.R value, the second character specifies the Color.G value, and the third character specifies the Color.B value. For example,
00F. - argb
-
A four-character hexadecimal value that describes a Color. The first character specifies the color's Color.A value, the second character specifies its Color.R value, the third character specifies the Color.G value, and the fourth character specifies its Color.B value. For example,
F00F. - rrggbb
-
A six-character hexadecimal value that describes a Color. The first two character specify the color's Color.R value, the next two specify its Color.G value, and the final two specify its Color.B value. For example,
0000FF. - aarrggbb
-
An eight-character hexadecimal value that describes a Color. The first two characters specify the color's Color.A value, the next two specify its Color.R value, the next two specify its Color.G value, and the final two specify its Color.B value. For example,
FF0000FF. - scA
-
The ScA value for a Color. Color does not store a specific ScA value, so the provided value will be converted and stored in Color.A.
- scR
-
The ScR value for a Color. Color does not store a specific ScR value, so the provided value will be converted and stored in Color.R.
- scG
-
The ScG value for a Color. Color does not store a specific ScG value, so the provided value will be converted and stored in Color.G.
- scB
-
The ScB value for a Color. Color does not store a specific ScB value, so the provided value will be converted and stored in Color.B.
Attributes
- MarshalingBehaviorAttribute(Agile)
- StaticAttribute(Windows.UI.Xaml.Media.IBrushStatics, NTDDI_WIN8)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The Brush class has these types of members:
Constructors
The Brush class has these constructors.
| Constructor | Description |
|---|---|
| Brush | Provides base class initialization behavior for Brush-derived classes. |
Methods
The Brush class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject) |
| GetAnimationBaseValue | Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject) |
| GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject) |
| ReadLocalValue | Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject) |
| SetValue | Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject) |
Properties
The Brush class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject) | |
| Read/write | Gets or sets the degree of opacity of a Brush. | |
| Read-only | Identifies the Opacity dependency property. | |
| Read/write | Gets or sets the transformation that is applied to the brush using relative coordinates. | |
| Read-only | Identifies the RelativeTransform dependency property. | |
| Read/write | Gets or sets the transformation that is applied to the brush. | |
| Read-only | Identifies the Transform dependency property. |
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
