HeaderPane
Main
Hide
Share Link
Print

High Contrast

Windows High Contrast (contrast themes) is an accessibility setting, not a visual preference. Users who enable it have committed to a specific high-contrast color scheme for everything on screen, and Microsoft's accessibility guidelines require applications to let the user's scheme win over any application-chosen colors. SftStyle/NET 3.0 follows this rule when high contrast mode is active.

The SftStyle.HighContrastMode property of the SftStyle component has three values (see HighContrastModeEnum):

ValueDescription
HighContrastModeEnum.AutoFollow the Windows contrast theme setting. The forms switch when the setting changes.
HighContrastModeEnum.OnAlways use the system colors, regardless of the Windows setting. Useful for testing.
HighContrastModeEnum.Off (default)Ignore the Windows contrast theme setting. Not recommended in shipping applications - users with a contrast theme see the dark mode colors instead of their theme while dark mode is active.

While high contrast mode is active, the component does not style the forms: Windows Forms draws them with the system colors, which Windows sets to the colors of the user's contrast theme. Colors the application set itself are not changed by the component; an application that sets its own colors resets them while SftStyle.HighContrastActive is True. The SftStyle.HighContrastChanged event occurs each time the forms switch between their own colors and the colors of the contrast theme.

The message box, the task dialog and the color dialog use the system colors of the contrast theme and draw their buttons, check boxes and other parts without Windows themes while the component's high contrast mode is active. The SftSlider control has a HighContrastMode property of its own (see Controls of Other Softel vdm Products); in high contrast it is drawn in the Standard look with the colors of the contrast theme.

Dark mode and Windows High Contrast are independent settings. If both are active, high contrast takes precedence, because honoring the user's contrast theme is the stronger accessibility requirement.