Skip to content

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

Closed

Description

@Olina-Zhang

.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: #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

Activity

  1. added
    untriaged
    area-DarkMode
    on Aug 21, 2024
  2. RussKie commented on Aug 22, 2024

    @RussKie
    Contributor

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

  3. memoarfaa commented on Aug 22, 2024

    @memoarfaa

    @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

    2024-08-22_19-43-02.mp4
  4. RussKie commented on Aug 23, 2024

    @RussKie
    Contributor

    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).

  5. added
    🚧 work in progress
    on Aug 25, 2024
  6. memoarfaa commented on Aug 25, 2024

    @memoarfaa

    @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");

  7. added
    help wanted
    and removed
    untriaged
    on Sep 4, 2024
  8. added theissue type on May 5, 2025
  9. Zheng-Li01 commented on Jul 31, 2025

    @Zheng-Li01
    Member

    Verified the issue with .NET SDK 10.0.100-preview.7.25380.105 build, the issue has been fixed that TabControl have correct background in dark mode as below screenshot.
    Image

  10. Zheng-Li01 commented on Aug 1, 2025

    @Zheng-Li01
    Member

    Verified issue with .NET SDK 10.0.100-preview.7.25380.108 test pass build, the issue has been fixed, result is same as above.

  11. Amy-Li03 commented on Aug 7, 2025

    @Amy-Li03
    Contributor

    Verified issue with .NET SDK 10.0.100-rc.1.25406.102 build, the issue has been fixed, result is same as above.

  12. locked and limited conversation to collaborators on Sep 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

🚧 work in progressarea-DarkModehelp wanted

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions