-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
.NET version
Microsoft Visual Studio Community 2022 (64-bit) - Preview
Version 17.14.7 Preview 1.0
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
N/A
Issue description
It is unclear how to get TabPage to correctly render in DarkMode in both .Net 9 and .Net 10.
The designer does not support DarkMode (by design?) so it's difficult to know how it should be setup.
With TabPage1.UseVisualStyleBackColor = True, Tab Background is Dark but the page background is white
With TabPage1.UseVisualStyleBackColor = False, Tab Background is Dark and the page background is dark
If I render the Tabs (to make them dark) in code the tab background is always white
Also unless I render the tabs the selected tab is not highlighted.
I need tabs and the space behind the tabs to be dark, this is separate from the main area of the tab which I either want Blank or don't care about.
Steps to reproduce
Add TabControl to Form, add some TabPages and set
Private Sub MyApplication_ApplyApplicationDefaults(sender As Object, e As ApplyApplicationDefaultsEventArgs) Handles Me.ApplyApplicationDefaults
e.ColorMode = SystemColorMode.Dark
End Sub
From Form1.Designer
'
' TabControl1
'
TabControl1.Controls.Add(TabPage1)
TabControl1.Controls.Add(TabPage2)
TabControl1.Dock = DockStyle.Fill
TabControl1.Location = New Point(0, 0)
TabControl1.Name = "TabControl1"
TabControl1.SelectedIndex = 0
TabControl1.Size = New Size(1388, 180)
TabControl1.TabIndex = 0
'
' TabPage1
'
TabPage1.Location = New Point(4, 24)
TabPage1.Name = "TabPage1"
TabPage1.Padding = New Padding(3)
TabPage1.Size = New Size(1380, 152)
TabPage1.TabIndex = 0
TabPage1.Text = "TabPage1"
'
' TabPage2
'
TabPage2.Location = New Point(4, 24)
TabPage2.Name = "TabPage2"
TabPage2.Padding = New Padding(3)
TabPage2.Size = New Size(1380, 152)
TabPage2.TabIndex = 1
TabPage2.Text = "TabPage2"
TabPage2.UseVisualStyleBackColor = True
Test with TabPage1.UseVisualStyleBackColor True and False on both .Net 9 and 10