Skip to content

[Dark Mode] ToolTip is not in dark mode after enabled SystemColorMode.Dark #11954

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

ToolTip is not in dark mode after enabled SystemColorMode.Dark
image

Steps to reproduce

  1. Create a WinForms .NET application with checkBox and toolTip controls
  2. Find the ToolTip on toolTip1 property of checkBox, then set some text for this property
  3. Enable DarkMode by Application.SetColorMode(SystemColorMode.Dark) in Program.cs file
  4. Run application, tab or mouse over this checkBox to observe the keyboard tooltip or mouse tooltip

Activity

  1. added
    untriaged
    area-DarkMode
    on Aug 21, 2024
  2. added
    help wanted
    and removed
    untriaged
    on Sep 4, 2024
  3. willibrandon commented on Nov 4, 2024

    @willibrandon
    Contributor

    Not sure why, but it seems the TTM_SETTIPBKCOLOR message is ignored when visual style is enabled on the control. If I disable it, then I can set the ToolTip BackColor and ForeColor.

    Image

    Could a possible fix could be something similar to how the ToolTip is made contrasted enough in HC mode?

    if (SystemInformation.HighContrast)
    {
    PInvoke.SetWindowTheme(HWND, string.Empty, string.Empty);
    }

  4. willibrandon commented on Nov 4, 2024

    @willibrandon
    Contributor

    The unit test would be to retrieve the background color and text color for a tooltip window using messages TTM_GETTIPBKCOLOR and TTM_GETTIPTEXTCOLOR, and assert the values returned are equal to SystemColors.Info and SystemColors.InfoText.

    I believe that test fails right now when Dark mode is enabled.

  5. added
    🚧 work in progress
    on Nov 4, 2024
  6. added theissue type on May 5, 2025
  7. Zheng-Li01 commented on Jul 3, 2026

    @Zheng-Li01
    Member

    Tested in the latest .NET 11 Preview 7 build: 11.0.100-preview.7.26352.103 + built private dls from the main branch of Winforms repo, it was fixed in DarkMode:

    Image
  8. locked and limited conversation to collaborators on Aug 2, 2026
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