Defines whether the control uses dark mode colors.
Class: SoftelvdmUserControl
Namespace: Softelvdm.SftStyleNET.Controls
Assembly: Softelvdm.SftStyleNET
public DarkModeEnum DarkMode { get; set; }
Public Property DarkMode As DarkModeEnumThe dark mode setting.
The default value is DarkModeEnum.Off.
Defines whether the control uses dark mode colors.
In dark mode, colors that are left at their system defaults are replaced by their dark counterparts and the Themed look (SftSlider.Look property) uses the dark track bar parts of the Windows theme. Colors that are set explicitly are used as defined.
With DarkModeEnum.Auto, the control follows the Windows setting for app mode (Settings, Personalization, Colors) and switches when that setting changes. The SoftelvdmUserControl.DarkModeActive property returns the resulting state.
The slider does not take the mode of the application's SftStyle component; set its DarkMode and SoftelvdmUserControl.HighContrastMode to the component's settings, or to Auto.
combo.SelectedItem = current;
}
// The SftStyle component shows every form of the application in the selected mode. The sliders have a DarkMode and
// HighContrastMode of their own, which follow the component's here.
private void comboDarkMode_SelectedIndexChanged(object sender, EventArgs e) {
DarkModeEnum mode = (DarkModeEnum)comboDarkMode.SelectedItem;
sftStyle1.DarkMode = mode;
sliderVolume.DarkMode = mode;
sliderPrice.DarkMode = mode;
}
private void comboHighContrast_SelectedIndexChanged(object sender, EventArgs e) {
HighContrastModeEnum mode = (HighContrastModeEnum)comboHighContrast.SelectedItem;
sftStyle1.HighContrastMode = mode;
sliderVolume.HighContrastMode = mode;
combo.SelectedItem = current
End Sub
' The SftStyle component shows every form of the application in the selected mode. The sliders have a DarkMode and
' HighContrastMode of their own, which follow the component's here.
Private Sub ComboDarkMode_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ComboDarkMode.SelectedIndexChanged
Dim mode As DarkModeEnum = CType(ComboDarkMode.SelectedItem, DarkModeEnum)
SftStyle1.DarkMode = mode
SliderVolume.DarkMode = mode
SliderPrice.DarkMode = mode
End Sub
Private Sub ComboHighContrast_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ComboHighContrast.SelectedIndexChanged
Dim mode As HighContrastModeEnum = CType(ComboHighContrast.SelectedItem, HighContrastModeEnum)
SftStyle1.HighContrastMode = mode
SliderVolume.HighContrastMode = modeSee Also SoftelvdmUserControl Class | Classes | SftStyle/NET 3.0