SftStyle/NET 3.0 supports Windows Forms applications for .NET 10 (or later) as well as for the .NET Framework 4.7 (or later). The classes, properties, methods and events are the same on both. On .NET 10 the SftStyle component uses the dark mode of Windows Forms itself and adds what it leaves out (see .NET Framework and .NET 10).
.NET 10 projects reference SftStyle/NET through its NuGet package Softelvdm.SftStyleNET. Setup installs the package in the SftStyle/NET installation directory (\Program Files (x86)\Softelvdm\SftStyle NET 3.0\NuGet\) and registers that folder as the package source "Softelvdm SftStyle NET 3.0" for all users of the system.
In Visual Studio, create a new project from the "Windows Forms App" template (C# or Visual Basic) and select .NET 10.0 as the framework. An existing Windows Forms project for .NET 10 (or later) works the same way.
In Solution Explorer, right-click the project and select Manage NuGet Packages. On the Browse tab, select "Softelvdm SftStyle NET 3.0" as the package source, select the package Softelvdm.SftStyleNET and click Install.
The package can also be added to the project file directly:
<ItemGroup> <PackageReference Include="Softelvdm.SftStyleNET" Version="3.0.0" /> </ItemGroup>
Open the main form in the designer. The Toolbox shows SftStyle, SftColorDialog and SftSlider (Softelvdm.SftStyleNET) in the group Softelvdm.SftStyleNET. Drag SftStyle onto the form; the component appears in the component tray below the form.
Click the smart tag at the top right corner of the component to open its tasks and choose Dark mode and High contrast: Off, On, or Auto to follow the Windows setting.
Build and run the application. The code examples in Using SftStyle/NET with .NET Framework work unchanged in .NET 10 projects. Don't call Application.SetColorMode in an application that uses SftStyle; the component calls it.
Visual Studio's designer for .NET projects runs the components and controls on a form in a separate process. SftStyle/NET supports this designer: the components and the slider are placed from the Toolbox and edited in the Properties window and through their smart tags. The product information (About dialog, registration and license updates) opens from the smart tags.
The designer saves the license of the SftStyle and SftColorDialog components as a string in the form's code, which loads in both frameworks. A slider saves it in the Contents resource of the form; the Contents resource of a form designed in a .NET Framework project cannot be loaded in a .NET 10 project, so place the slider on the form again in the .NET 10 project.
A .NET 10 application becomes per-monitor aware by calling Application.SetHighDpiMode(HighDpiMode.PerMonitorV2) before it creates its first window. See Per-Monitor DPI and Scaling.
SftStyle/NET 3.0, SftTree/NET 3.0, SftTabs/NET 3.0, SftDate/NET 3.0, SftBox/NET 3.0 and SftMask/NET 3.0 can be used in the same application. Each product comes in its own assembly and its own NuGet package. The classes the products share are defined in the namespace Softelvdm.SftStyleNET.Controls for SftStyle/NET, Softelvdm.SftMaskNET.Controls for SftMask/NET, Softelvdm.SftDateNET.Controls for SftDate/NET, Softelvdm.SftBoxNET.Controls for SftBox/NET, Softelvdm.SftTabsNET.Controls for SftTabs/NET and Softelvdm.Controls for SftTree/NET. The controls of those products keep their own DarkMode and HighContrastMode properties (see Controls of Other Softel vdm Products).
When a .NET 10 application is built, Softelvdm.SftStyleNET.dll is copied from the NuGet package to the application's output folder. Distribute it with the application as described in Distributing SftStyle/NET.