SftTabs/NET 3.0 supports dark mode. By default the tab control uses its light colors. An application opts in by setting the DarkMode property to DarkModeEnum.Auto, so the control follows the Windows app mode setting (Settings, Personalization, Colors): users who have selected Dark see dark colors, users who have selected Light see the traditional colors, and the control switches when the setting changes. DarkModeEnum.On always uses dark colors.
What changes in dark mode: colors left at their defaults are replaced by dark counterparts in the tabs, the tab text, the tab pages, the borders, the buttons and the tooltips. The Themed look (see Tab Looks) draws the tabs like the Flat look, because the Windows theme does not offer dark tabs.
The other looks keep their shape and use dark colors, for example the Document look:
The DarkMode property has three values (see DarkModeEnum):
| Value | Description |
|---|---|
| DarkModeEnum.Auto | Follow the Windows app mode setting. The control switches when the setting changes. |
| DarkModeEnum.On | Always use dark colors, regardless of the Windows setting. Useful when the application has its own light/dark setting and wants the tab control to follow it. |
| DarkModeEnum.Off (default) | Always use light colors, regardless of the Windows setting. |
The DarkModeChanged event occurs each time the control switches between light and dark colors, so the application can update its own colors around the tab control and the colors of the controls on the tab pages. The DarkModeActive property returns the current state at any time.
Colors set by the application for the control, its tabs and parts are still used in dark mode - the control does not replace colors the application chose. Pick colors that read well on both a light and a dark background, or change them in the DarkModeChanged event.
The color properties keep their values while dark mode is active, so forms saved in the designer while dark mode is active keep their light colors.
The controls an application places on the tab pages are not changed by the tab control. They inherit the dark background of the page; their own colors are defined by the application.
Dark mode and Windows High Contrast are independent settings. If both are active, high contrast takes precedence. See High Contrast.