SftMask/NET 3.0 supports Windows Forms applications for .NET 10 (or later) as well as for the .NET Framework 4.7 (or later). The control's classes, properties, methods and events are the same on both.
.NET 10 projects reference SftMask/NET through its NuGet package Softelvdm.SftMaskNET. Setup installs the package in the SftMask/NET installation directory (\Program Files (x86)\Softelvdm\SftMask NET 3.0\NuGet\) and registers that folder as the package source "Softelvdm SftMask 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 SftMask NET 3.0" as the package source, select the package Softelvdm.SftMaskNET and click Install.
The package can also be added to the project file directly:
<ItemGroup> <PackageReference Include="Softelvdm.SftMaskNET" Version="3.0.0" /> </ItemGroup>
Open the form in the designer. The Toolbox shows the control as SftMask (Softelvdm.SftMaskNET) in the group Softelvdm.SftMaskNET. Drag it onto the form.
Click the smart tag at the top right corner of the control to open its tasks. Edit Properties opens the property pages; Define Mask..., Calculator... and AutoComplete... open them on the Mask, Calculator and AutoComplete pages.
Build and run the application. The code example in Using SftMask/NET with .NET Framework works unchanged in .NET 10 projects.
Visual Studio's designer for .NET projects runs the controls on a form in a separate process. SftMask/NET supports this designer: the control is placed from the Toolbox and edited in the Properties window and through its smart tag.
The property pages open from the smart tag and from the Properties window, as in .NET Framework projects. In .NET projects they edit a copy of the control, and the control on the form is updated when Apply is clicked.
The contents of an SftMask control (the GetContents method) hold no images or fonts, so contents saved by a .NET 10 application load in .NET Framework applications and the other way around. The Contents resource of a form designed in a .NET Framework project cannot be loaded in a .NET 10 project; place the control 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.
SftMask/NET 3.0, SftTree/NET 3.0, SftTabs/NET 3.0, SftDate/NET 3.0 and SftBox/NET 3.0 can be used in the same application, for example with masked fields and date fields on a tab page. Each product comes in its own assembly and its own NuGet package. The classes the products share are defined in the namespace 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.
When a .NET 10 application is built, Softelvdm.SftMaskNET.dll is copied from the NuGet package to the application's output folder. Distribute it with the application as described in Distributing SftMask/NET.