ColorExtensions Class
Provides extension methods for the type System.Windows.Media.Color.
public static class ColorExtensions
- Inheritance:
- System.Object Object
Methods
Tint(Color, Color)
Returns the custom tinted System.Windows.Media.Color for the specified base and tint System.Windows.Media.Color.
public static Color Tint(this Color color, Color tintColor)
Parameter | Type | Description |
---|---|---|
color | System.Windows.Media.Color | The base System.Windows.Media.Color to examine. |
tintColor | System.Windows.Media.Color | The tint System.Windows.Media.Color. |
Returns
- System.Windows.Media.Color:
The custom tinted System.Windows.Media.Color for the specified base and tint System.Windows.Media.Color.
ToSolidColorBrush(Color)
Converts the specified System.Windows.Media.Color to a System.Windows.Media.SolidColorBrush.
public static SolidColorBrush ToSolidColorBrush(this Color color)
Parameter | Type | Description |
---|---|---|
color | System.Windows.Media.Color | The color to convert. |
Returns
- System.Windows.Media.SolidColorBrush:
A System.Windows.Media.SolidColorBrush initialized with the specified System.Windows.Media.Color.
Remarks
If possible, the brush will be frozen before being returned.
ToSolidColorBrush(Color, Boolean)
Converts the specified System.Windows.Media.Color to a System.Windows.Media.SolidColorBrush.
public static SolidColorBrush ToSolidColorBrush(this Color color, bool freeze)
Parameter | Type | Description |
---|---|---|
color | System.Windows.Media.Color | The color to convert. |
freeze | System.Boolean | if set to |
Returns
- System.Windows.Media.SolidColorBrush:
A System.Windows.Media.SolidColorBrush initialized with 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()