SystemParameters.HighContrast Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets a value that indicates whether the client computer is in high-contrast mode.
Assembly: System.Windows (in System.Windows.dll)
Property Value
Type: System.Booleantrue if the client computer is in high-contrast mode; otherwise, false.
You can check this property to determine whether the application is running on a computer that is in high contrast mode. If the computer is in high-contrast mode, you should do the following:
Convey information by UI design techniques other than color. For example, if highlighted items in a list have red foreground, you can add a cue that does not rely on color, such as making the font of the highlighted items bold, or adding an icon or symbol to the text.
Omit patterns and images behind text.
The HighContrast property is true when the user has enabled High Contrast in Control Panel.
Some techniques that may be useful for creating high contrast UI include the following:
Set colors of elements within your UI by using brush resource elements in a ResourceDictionary. If a change in HighContrast occurs, you can use one of several techniques to change the value of the resource. For example, you can change the resource itself programmatically, or you can introduce a resource that has the same key and overrides the previous brush resource in lookup sequence.
By resetting the Template property, you can load a complete control theme template that is designed for high contrast, including changing background brushes, border sizes, text colors and so on.