winforms icon indicating copy to clipboard operation
winforms copied to clipboard

[DarkMode]: TabControl doesn't render tab titles correctly when SizeMode = Fixed

Open peymanr34 opened this issue 4 months ago • 3 comments

.NET version

10.0.100-rc.1.25451.107

Did it work in .NET Framework?

No

Did it work in any of the earlier releases of .NET Core or .NET 5+?

N/A

Issue description

When dark mode is enabled, the tab page titles doesn't render correctly when TabControl.SizeMode = Fixed:

Image

If you minimize or resize the window, it will be displayed correctly (if TabControl.Dock = Fill):

Image

In classic mode works as expected:

Image

And since TabControl didn't support Dark Mode in .NET 9, works as expected:

Image

Steps to reproduce

  1. Create a new Windows Forms App
  2. Set the dark mode in Program.cs
Application.SetColorMode(SystemColorMode.Dark);
  1. Add a new TabControl to the Form1
  2. Set tabControl1.SizeMode to Fixed via the Designer.
  3. Set tabControl1.Dock to Fill via the Designer (optional).

peymanr34 avatar Sep 15 '25 09:09 peymanr34

If not setting the tabControl1.Dock to Fill, the issue will persist indefinitely and cannot be resolved with minimize or resize the window.

https://github.com/user-attachments/assets/668bdbff-7f71-4093-9eb4-186d5f6d26df

Zheng-Li01 avatar Sep 16 '25 01:09 Zheng-Li01

This issue is introduced by commit 57fd18b.

LeafShi1 avatar Sep 16 '25 06:09 LeafShi1

@KlausLoeffelmann getting this one on your radar too.

merriemcgaw avatar Nov 21 '25 00:11 merriemcgaw