In This Article

ColorExtensions Class

Provides extension methods for the type Color.

public static class ColorExtensions
Inheritance:
object object

Methods

Tint(Color, Color)

Returns the custom tinted Color for the specified base and tint Color.

public static Color Tint(this Color color, Color tintColor)
Parameter Type Description
color Color

The base Color to examine.

tintColor Color

The tint Color.

Returns

Color:

The custom tinted Color for the specified base and tint Color.

ToSolidColorBrush(Color)

Converts the specified Color to a SolidColorBrush.

public static SolidColorBrush ToSolidColorBrush(this Color color)
Parameter Type Description
color Color

The color to convert.

Returns

SolidColorBrush:

A SolidColorBrush initialized with the specified Color.

Remarks

If possible, the brush will be frozen before being returned.

ToSolidColorBrush(Color, bool)

Converts the specified Color to a SolidColorBrush.

public static SolidColorBrush ToSolidColorBrush(this Color color, bool freeze)
Parameter Type Description
color Color

The color to convert.

freeze bool

if set to true then the brush will be frozen.

Returns

SolidColorBrush:

A SolidColorBrush initialized with the specified Color.

Inherited Members