Returns a value of the contrast color (contrast to accent color) for the control, using safe method without exceptions.

Namespace: Elysium
Assembly: Elysium (in Elysium.dll) Version: 2.0.976.4 (2.0.976.4)


public static bool TryGetContrastBrush(
	this FrameworkElement reference,
	out SolidColorBrush contrastBrush
Visual Basic
Public Shared Function TryGetContrastBrush ( 
	reference As FrameworkElement,
	<OutAttribute> ByRef contrastBrush As SolidColorBrush
) As Boolean


Type: System.Windows..::..FrameworkElement
A control, whose contrast color (contrast to accent color) is needed to get.
Type: System.Windows.Media..::..SolidColorBrush%
A constrast color (contrast to accent color) for the control.

Return Value

Type: Boolean
True, if method succeeded, false otherwise.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type FrameworkElement. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also