dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.43k stars 988 forks source link

[Dark Mode] TabControl is not in dark mode after enabled SystemColorMode.Dark #11953

Open Olina-Zhang opened 3 months ago

Olina-Zhang commented 3 months ago

.NET version

9.0.0-rc.1.24418.2 + private dlls built from winforms repo main branch

Did it work in .NET Framework?

No

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

This is a new feature Dark Mode: https://github.com/dotnet/winforms/pull/11857

Issue description

TabControl is not in dark mode after enabled SystemColorMode.Dark

image

Steps to reproduce

  1. Create a WinForms .NET application with TabControl control
  2. Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in Program.cs file
  3. Run application to observe
RussKie commented 3 months ago

This is probably the largest shortcoming of the current dark-mode implementation which greatly reduces the usefulness of the feature.

memoarfaa commented 3 months ago

@RussKie

This is probably the largest shortcoming of the current dark-mode implementation which greatly reduces the usefulness of the feature.

Do you mean the Tab Control or all Controls that do not have dark mode Completely applied? The Tab control can easily have dark mode but there are other Controls that are hard to have dark mode.

99% from issues that is labeled with area-Darkmode I experienced it before .

So I need to have a good discussion here about what is easy to get in dark mode, what is moderately applicable in dark mode and what is hard to get in dark mode.

Do you think open an draft pull request is sufficient? or I need to Open discuss also?

@JeremyKuhne, @merriemcgaw.

This is Tab Control that is have dark mode with One line Of code

https://github.com/user-attachments/assets/254c1910-6eb5-47a7-8331-aa15011dc968

RussKie commented 3 months ago

Do you think open an draft pull request is sufficient? or I need to Open discuss also? This is Tab Control that is have dark mode with One line Of code

πŸ”₯

Being able to visualise the required change is always very helpful (so having a draft PR is πŸ‘). If these are simple fixes (e.g., a one-liner) then there's a chance the team may be able to take into the .NET 9 release. It's for team to decide though (I'm no longer a part of this team).

memoarfaa commented 3 months ago

@RussKie

Do you think open an draft pull request is sufficient? or I need to Open discuss also? This is Tab Control that is have dark mode with One line Of code

πŸ”₯

Being able to visualise the required change is always very helpful (so having a draft PR is πŸ‘). If these are simple fixes (e.g., a one-liner) then there's a chance the team may be able to take into the .NET 9 release. It's for team to decide though (I'm no longer a part of this team).

I Open an draft PR What do you think about use subclass::class in VisualStyleRenderer

about Tab Control I used

SetWindowTheme(HWND, null, "DarkMode::FileExplorerBannerContainer");

dotnet-policy-service[bot] commented 2 months ago

This issue is now marked as "help wanted", and we’re looking for a community volunteer to work on this issue. If we receive no interest in 180 days, we will close the issue. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!