Returns whether high contrast is in effect.
Class: SftStyle
Namespace: Softelvdm.SftStyleNET
Assembly: Softelvdm.SftStyleNET
public bool HighContrastActive { get; }
Public ReadOnly Property HighContrastActive As BooleanTrue if high contrast is in effect from SftStyle.HighContrastMode and, with HighContrastModeEnum.Auto, the Windows contrast theme setting, False otherwise.
Returns whether high contrast is in effect.
}
private void sftStyle1_HighContrastChanged(object sender, EventArgs e) {
ShowState();
}
// With Auto, the component follows the Windows settings, also when they change while the form is open.
private void ShowState() {
labelState.Text = "Dark mode is " + (sftStyle1.DarkModeActive ? "on" : "off") + ", high contrast is " + (sftStyle1.HighContrastActive ? "on" : "off") + ".";
}
private void sliderVolume_ValueChanged(object sender, EventArgs e) {
ShowSliders();
}
private void sliderPrice_RangeChanged(object sender, EventArgs e) {
End Sub
Private Sub SftStyle1_HighContrastChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SftStyle1.HighContrastChanged
ShowState()
End Sub
' With Auto, the component follows the Windows settings, also when they change while the form is open.
Private Sub ShowState()
LabelState.Text = "Dark mode is " + If(SftStyle1.DarkModeActive, "on", "off") + ", high contrast is " + If(SftStyle1.HighContrastActive, "on", "off") + "."
End Sub
Private Sub SliderVolume_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SliderVolume.ValueChanged
ShowSliders()
End Sub
Private Sub SliderPrice_RangeChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SliderPrice.RangeChangedSee Also SftStyle Class | Classes | SftStyle/NET 3.0