-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TabControl difficult to support Dark mode #5225
Comments
Please search first this has been talked about already #5166 |
I searched but thanks for the link. Built-in support for darkmode API and ability to set ForeColor/BackColor seem like 2 different things. Most WinForms controls you can easily override display behavior with color; TabControl seems immune and especially difficult, even with custom paint events. I've tried multiple packages and code samples trying to get something to look legit. So this is not just a general request for WinForms dark mode, but concern that TabControl is specifically inflexible |
I faced the same issue, our darkmode implementation is stuck because of "TabControl" |
I was able to work around this for my use case, but I agree that it should be much simpler. |
The list of things you have to fix to have a decent dark mode is very long and once you make a few progresses, you step on stuff that cannot be fixed natively (like TabControl, ToolStripSeparator, ScrollBars, etc.) Thanks @DavidWiseman I'll take a look at your approach |
@KlausLoeffelmann how does your dark mode work impact this issue? |
Still one of the problematic issues. |
I am hoping to improve TabControl dark mode in #12471. |
It seems WinForms on .NET 5 has no built-in support for dark mode theming. I can implement a custom darkmode theme switcher that sets BackColor and ForeColor on most controls easily, but TabControl doesn't support it. There is no built in way to override the paint event without building a custom control that inherits TabControl and overrides OnPaint/Draw. TabControl also seems unresponsive to the Win32 API SetWindowsTheme(). It would be wonderful if some properties were exposed to set BackColor and ForeColor on TabControl, and maybe some ways to draw the border of a selected tab, especially when Appearance = FlatButtons, to make it easier to theme "darkly". Or if Metro style tabcontrols were available for Winforms.
SetWindowTheme(tabInfo.Handle, "DarkMode_Explorer", null); [uxtheme.dll]
The text was updated successfully, but these errors were encountered: