Returns a contrast color (contrast to accent color) for the specified control by calling safe method without exceptions.

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

Syntax

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

Parameters

reference
Type: System.Windows..::..Application
A control, whose contrast color (contrast to accent color) is needed to get.
contrastBrush
Type: System.Windows.Media..::..SolidColorBrush%
A contrast color (contrast to accent color) for the specified 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 Application. 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