BrushExtensions Class
Provides extension methods for the type System.Windows.Media.Brush.
public static class BrushExtensions
- Inheritance:
- System.Object Object
Methods
Tint(Brush, Color)
Returns a clone of the specified System.Windows.Media.Brush that has been tinted towards the specified System.Windows.Media.Color.
public static Brush Tint(this Brush brush, Color tintColor)
Parameter | Type | Description |
---|---|---|
brush | System.Windows.Media.Brush | The System.Windows.Media.Brush to clone and tint. |
tintColor | System.Windows.Media.Color | The tint System.Windows.Media.Color. |
Returns
- System.Windows.Media.Brush:
A clone of the specified System.Windows.Media.Brush that has been tinted towards the specified System.Windows.Media.Color.
Remarks
The brush returned will be always be frozen. A non-frozen brush can be obtained by calling the Tint(Brush, Color) overload.
Tint(Brush, Color, Boolean)
Returns a clone of the specified System.Windows.Media.Brush that has been tinted towards the specified System.Windows.Media.Color.
public static Brush Tint(this Brush brush, Color tintColor, bool freeze)
Parameter | Type | Description |
---|---|---|
brush | System.Windows.Media.Brush | The System.Windows.Media.Brush to clone and tint. |
tintColor | System.Windows.Media.Color | The tint System.Windows.Media.Color. |
freeze | System.Boolean | if set to |
Returns
- System.Windows.Media.Brush:
A clone of the specified System.Windows.Media.Brush that has been tinted towards the specified System.Windows.Media.Color.
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()