HeaderPane
Main
Hide
Share Link
Print

Comparison with Windows Forms

SftStyle/NET follows the classes of Windows Forms where Windows Forms has one, so an application moves to it with few changes. These tables show where each function of the Windows Forms classes is found and what differs.

Application.SetColorMode

Windows FormsSftStyle/NET
Application.SetColorMode (.NET 10 and later)The SftStyle component, on the .NET Framework as well. SftStyle.DarkMode with DarkModeEnum.Off, On and Auto corresponds to SystemColorMode.Classic, Dark and System. Forms that are open switch completely, the gaps of the Windows Forms dark mode are filled, and high contrast is handled (see .NET Framework and .NET 10). The component calls Application.SetColorMode itself on .NET 10.
Application.ColorMode, Application.SystemColorMode, Application.IsDarkModeEnabledSftStyle.DarkMode, SftStyle.DarkModeActive
SystemEvents.UserPreferenceChangedSftStyle.DarkModeChanged, SftStyle.HighContrastChanged

MessageBox

Windows FormsSftStyle/NET
MessageBox.ShowSftMessageBox.Show, with every overload and the same arguments and results. The message box follows the mode of the SftStyle component. MessageBoxOptions.DefaultDesktopOnly and MessageBoxOptions.ServiceNotification show the Windows message box, without an owner and a Help button.

TaskDialog

The task dialog of Windows Forms exists in .NET 5 and later only and shows the task dialog of Windows. SftTaskDialog has the same classes and members, with the Sft prefix, on the .NET Framework as well, and follows the same rules: which properties can change while a page is shown, the checks before a page is shown, the order of the standard buttons, and what Esc, the close box and a dialog without an owner do. Unlike the Windows Forms TaskDialog, a page can have command links and custom buttons together.

Windows FormsSftStyle/NET
TaskDialog.ShowDialog, TaskDialog.ShowDialogAsync, TaskDialog.Close, TaskDialog.HandleSftTaskDialog.ShowDialog and SftTaskDialog.ShowDialogAsync, with the owner as IWin32Window or window handle and SftTaskDialogStartupLocation; SftTaskDialog.Close and SftTaskDialog.Handle
TaskDialogPageSftTaskDialogPage: Caption, Heading, Text, Icon, Buttons, RadioButtons, DefaultButton, Verification, Expander, Footnote, ProgressBar, AllowCancel, AllowMinimize, SizeToContent, RightToLeftLayout, EnableLinks, BoundDialog, Navigate and the Created, Destroyed, HelpRequest and LinkClicked events
TaskDialogButton, TaskDialogCommandLinkButtonSftTaskDialogButton, SftTaskDialogCommandLinkButton: the standard buttons, Text, Enabled, Visible, ShowShieldIcon, AllowCloseDialog, Click, PerformClick, the == and != operators, DescriptionText
TaskDialogRadioButton, TaskDialogVerificationCheckBox, TaskDialogExpander, TaskDialogFootnoteSftTaskDialogRadioButton, SftTaskDialogVerificationCheckBox, SftTaskDialogExpander, SftTaskDialogFootnote, with the same properties, events and conversions from a string, and BoundPage on every element
TaskDialogProgressBarSftTaskDialogProgressBar: State, Minimum, Maximum, Value, MarqueeSpeed
TaskDialogIconSftTaskDialogIcon: None, Information, Warning, Error, Shield, the shield icons with a colored bar (ShieldBlueBar, ShieldGrayBar, ShieldWarningYellowBar, ShieldErrorRedBar, ShieldSuccessGreenBar) and icons of the application's own from an Icon, a Bitmap or an icon handle
TaskDialogLinkClickedEventArgsSftTaskDialogLinkClickedEventArgs

ColorDialog

Windows FormsSftStyle/NET
ColorDialogSftColorDialog, with Color, CustomColors, AllowFullOpen, FullOpen, AnyColor, SolidColorOnly, ShowHelp, Reset, ShowDialog and the HelpRequest event, plus AllowAlpha for partially transparent colors, named and system colors and a picker. A named or system color the user picks is returned as that color (see Color Dialog).

TrackBar

Windows FormsSftStyle/NET
Orientation, Minimum, Maximum, Value, SmallChange, LargeChange, TickStyle, TickFrequency, ValueChanged, ScrollThe SftSlider members of the same names. A Value outside SftSlider.Minimum and SftSlider.Maximum is moved inside, where the TrackBar throws an exception, and SftSlider.TickFrequency must be 1 or more.
SetRangeSet SftSlider.Minimum and SftSlider.Maximum.
RightToLeftLayoutRightToLeft alone mirrors a horizontal slider.
AutoSizeThe slider has the size the application gives it.
(none)Range mode, custom ticks, tick labels, snapping, inverted direction, value tip, three looks, accent color, dark mode and high contrast (see The Slider).