Class SolidColorBrush
Fills an area with a solid color.
public sealed class SolidColorBrush : Brush, INotifyPropertyChanged, ISolidColorBrush, IBrush
- Inheritance
-
SolidColorBrush
- Implements
- Inherited Members
- Extension Methods
Constructors
SolidColorBrush()
Initializes a new instance of the SolidColorBrush class.
public SolidColorBrush()
SolidColorBrush(Color, double)
Initializes a new instance of the SolidColorBrush class.
public SolidColorBrush(Color color, double opacity = 1)
Parameters
SolidColorBrush(uint)
Initializes a new instance of the SolidColorBrush class.
public SolidColorBrush(uint color)
Parameters
color
uintThe color to use.
Fields
ColorProperty
Defines the Color property.
public static readonly StyledProperty<Color> ColorProperty
Field Value
Properties
Color
Gets or sets the color of the brush.
public Color Color { get; set; }
Property Value
Methods
Parse(string)
Parses a brush string.
public static SolidColorBrush Parse(string s)
Parameters
s
stringThe brush string.
Returns
- SolidColorBrush
The Color.
Remarks
Whereas Parse(string) may return an immutable solid color brush, this method always returns a mutable SolidColorBrush.
ToImmutable()
Creates an immutable clone of the brush.
public IImmutableBrush ToImmutable()
Returns
- IImmutableBrush
The immutable clone.
ToString()
Returns a string representation of the brush.
public override string ToString()
Returns
- string
A string representation of the brush.