You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Dark Mode] ToolTip is not in dark mode after enabled SystemColorMode.Dark #11954
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.
Could a possible fix could be something similar to how the ToolTip is made contrasted enough in HC mode?
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.
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:
Activity
willibrandon commentedon Nov 4, 2024
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.
Could a possible fix could be something similar to how the ToolTip is made contrasted enough in HC mode?
winforms/src/System.Windows.Forms/src/System/Windows/Forms/ToolTip/ToolTip.cs
Lines 717 to 720 in c9aa1c9
willibrandon commentedon Nov 4, 2024
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.InfoandSystemColors.InfoText.I believe that test fails right now when Dark mode is enabled.
Zheng-Li01 commentedon Jul 3, 2026
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: