dotnet / dotnet/winforms

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

Open
#13,873 4 comments 0 reactions 2 assignees Claimed by @KlausLoeffelmann View on GitHub
area-DarkMode
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
20h 23m
Merged PRs (30d)
103

Description

### .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](https://github.com/user-attachments/assets/c57ceff9-dd4e-440a-8808-8eba1faaa14d)

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**
```csharp
Application.SetColorMode(SystemColorMode.Dark);
```
3. Add a new TabControl to the **Form1**
4. Set `tabControl1.SizeMode` to `Fixed` via the Designer.
5. Set `tabControl1.Dock` to `Fill` via the Designer (optional).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.