Dark mode and high contrast for every form of a Windows Forms application, on the .NET Framework and on .NET 10, with one API. An SftStyle component on the main form styles every form, the open ones and those created later, Off, On or following the Windows settings, and switches open forms when the user changes the Windows light/dark setting; a switch back to light restores every color. Title bars, menus, tool strips, scroll bars and the standard Windows Forms controls get dark colors; on .NET 10 the component uses the dark mode of Windows Forms and fills its gaps. SftStyle/NET adds SftMessageBox with every MessageBox overload, SftTaskDialog with command links, radio buttons, an expander, a progress bar and page navigation, also on the .NET Framework, SftColorDialog with named colors, RGB, HSV and hexadecimal fields, alpha and a screen color picker, and SftSlider, a TrackBar with a range mode, custom ticks and a value tip. Per-monitor high-DPI scaling and screen reader support.
SftStyle/NET shows the forms of a Windows Forms application in dark mode or with the colors of the Windows contrast theme, on the .NET Framework and on .NET 10, with one API. One SftStyle component on the main form styles every form of the application, the forms that are open and those created later, and switches them when the user changes the Windows light/dark setting while they are open.
The .NET Framework has no dark mode at all, and the dark mode of .NET 10 does not switch forms that are already open and leaves several controls light. SftStyle/NET covers both, and adds a message box, a task dialog and a color dialog that follow the same mode, and a slider with a range mode.
Coming from Application.SetColorMode, MessageBox, TaskDialog, ColorDialog or the TrackBar? See where each of their functions is found.
[#]
An SftStyle component on the main form styles every form of the application, Off, On or following the Windows settings.
<>
Open forms switch without being closed or recreated, when the application sets the mode or the user changes the Windows setting.
[x]
Buttons, check boxes, text boxes, combo boxes, lists, tree and list views, tab controls, data grid views and the other standard Windows Forms controls in dark colors.
(!)
SftMessageBox has every overload of the Windows Forms MessageBox, so a message box changes by its class name. SftTaskDialog has the classes of the Windows Forms TaskDialog, on the .NET Framework as well.
#FF
SftColorDialog has the properties of the Windows Forms ColorDialog, with named and system colors and a saturation and brightness area.
-o-
SftSlider has the properties and events of the Windows Forms TrackBar, with a range mode of two thumbs.
Screenshots
The demo sample shows standard controls, the message box, the task dialog, the color dialog and two sliders, one of them a range, with options for dark mode, high contrast and the slider look.
.NET Framework and .NET 10
SftStyle/NET 3.0 runs in .NET Framework 4.7 (or later) applications and in .NET 10 (or later) Windows Forms applications, with the same classes, properties, methods and events on both. On the .NET Framework, which has no dark mode, the SftStyle component styles the forms and their controls itself. On .NET 10 it uses the dark mode of Windows Forms, redoes on every open form what Windows Forms does when a control is created and styles the controls Windows Forms leaves light, so in both frameworks a form switched while it is open looks like one created in the new mode. .NET projects reference the Softelvdm.SftStyleNET NuGet package from the package source Setup registers; .NET Framework projects reference the assembly directly.
Built for modern Windows
Version 3.0 follows the system's choices, so your forms do too.
Set one property and every form follows the Windows light/dark setting, dialogs included, switching when the user changes it.
The slider, the dialogs and the dark mode painting are sized for the DPI of the monitor showing them.
Built-in UI Automation support makes the slider and the dialogs available to Narrator, NVDA, JAWS and others.
Honors the Windows contrast theme at your option, as Microsoft's accessibility guidelines require.
Development
Platforms
Compatibility
Distribution
Save with the bundle
SftBox/NET 3.0, SftDate/NET 3.0, SftMask/NET 3.0, SftStyle/NET 3.0, SftTabs/NET 3.0 and SftTree/NET 3.0 in one hugely discounted bundle.