Skip to content

[DarkMode]The Form1 title bar change to white color after change the ShowInTaskbar property #12992

Closed

Description

@MelonWang1

.NET version

.NET 10.0.100-preview.2.25118.3

Did it work in .NET Framework?

No

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

No, also repro in .NET 9.0 which it started to be supported.

Issue description

The Form1 title bar change to white color after change the ShowInTaskbar property.

Image

Steps to reproduce

  1. Create a winforms .NET Core project with a button control.
  2. Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in Program.cs file.
  3. Double click button control and add below code to button click event.
    `this.ShowInTaskbar = !this.ShowInTaskbar;
  4. Build and run.
  5. Click button control.

More Info:

  1. This issue also repro in FormShowinTaskbar test in WinformsControlTest app.
darkshow.mp4

Activity

  1. added
    area-DarkMode
    untriaged
    on Feb 20, 2025
  2. added
    area-DarkMode
    and removed
    area-DarkMode
    on Feb 20, 2025
  3. added
    help wanted
    and removed
    help wanted
    on Feb 21, 2025
  4. added
    help wanted
    on Feb 21, 2025
  5. dotnet-policy-service commented on Feb 21, 2025

    @dotnet-policy-service
    Contributor

    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!

  6. removed
    untriaged
    on Feb 25, 2025
  7. added theissue type on Feb 25, 2025
  8. KlausLoeffelmann commented on Feb 25, 2025

    @KlausLoeffelmann
    Member

    My assumption is, that all of those property causes a handle recreation, and I guess that then the dark-mode request does not get send off.

  9. AraHaan commented on May 2, 2025

    @AraHaan
    Member

    My assumption is, that all of those property causes a handle recreation, and I guess that then the dark-mode request does not get send off.

    My guess is to have handle recreation deferred to a separate specific method that is then used everywhere a handle recreation is needed that then honors the mode request as well so then it would fix this issue.

  10. Syareel-Sukeri commented on Jun 13, 2025

    @Syareel-Sukeri
    Contributor

    Still repro in the latest .NET 10 SDK build: 10.0.100-preview.6.25311.107, so reopen the issue.

    12992.mp4
  11. Amy-Li03 commented on Aug 20, 2026

    @Amy-Li03
    Contributor

    Tested in the latest .NET 11 RC1 build: 11.0.100-rc.1.26413.103 + built private dls from the main branch of WinForms repo, it was fixed. In Dark Mode, the Form's title bar is black after changed the ShowInTaskbar property.

    Image
  12. modified the milestones: Help wanted, 11.0-rc1 on Aug 20, 2026
  13. Zheng-Li01 commented on Aug 27, 2026

    @Zheng-Li01
    Member

    Tested in .NET 11 RC1 test pass build: 11.0.100-rc.1.26425.128, it has the same validation result as above.

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

Metadata

Metadata

Labels

area-DarkModehelp wanted

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions