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. SftTree/NET 3.0 follows this rule when high contrast mode is active.
When high contrast mode is active, the tree control:
The HighContrastMode property has three values (see HighContrastModeEnum):
| Value | Description |
|---|---|
| HighContrastModeEnum.Auto | Follow the Windows contrast theme setting. The control switches when the setting changes. |
| HighContrastModeEnum.On | Always use the system colors, regardless of the Windows setting. Useful for testing. |
| HighContrastModeEnum.Off (default) | Ignore the Windows contrast theme setting and draw normally. Not recommended in shipping applications - users with accessibility needs will see colors that do not follow their contrast theme. |
The HighContrastChanged event occurs each time the control switches between its own colors and the colors of the contrast theme, so the application can update its own colors around the tree control. The HighContrastActive property returns the current state at any time.
Images, such as item images, images in cells and background images, are drawn as defined. Make sure that the images used in the tree control remain visible with the user's contrast theme colors.
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. See Dark Mode.