Occurs when the control switches between light and dark mode colors.
Class: SoftelvdmUserControl
Namespace: Softelvdm.SftTabsNET.Controls
Assembly: Softelvdm.SftTabsNET
public event EventHandler DarkModeChanged;
Public Event DarkModeChanged As EventHandlerOccurs when the control switches between light and dark mode colors.
The event occurs when the DarkModeActive property changes, either because the DarkMode property was set or because the DarkMode property is set to DarkModeEnum.Auto and the Windows app mode setting changed.
info.Padding = New Padding(12)
info.Text = "This tab was added by the Add Tab button. Its close button removes it."
tab.Page.Controls.Add(info)
SetPageColors()
tab.Select()
End Sub
Private Sub SftTabs1_DarkModeChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SftTabs1.DarkModeChanged
SetPageColors()
End Sub
' the control paints the pages; the text color of the controls on the pages is the application's
Private Sub SetPageColors()
Dim fore As Color = If(SftTabs1.DarkModeActive, Color.White, SystemColors.ControlText)
For Each tab As TabClass In SftTabs1.TabsSee Also SoftelvdmUserControl Class | Classes | SftTabs/NET 3.0