Proposal: WinUI Win32 apps should use dark titlebar when app is in dark mode
See original GitHub issueProposal: WinUI Win32 apps should support dark title bar
Summary
A few versions back, File Explorer got a dark mode makeover, including a dark titlebar. WinUI Win32 apps use the standard white title bar regardless of whether the rest of the app is dark or not. WinUI Win32 apps should use the same API to make themselves have a dark title bar when the main content is in dark mode.
Rationale
- The dark mode title bar API already exists in Windows, and users are used to it thanks to File Explorer
- UWP XAML apps do not suffer from this visual clash
- It looks bad to have a white title bar with black content
Scope
Capability | Priority |
---|---|
The titlebar should obey the system theme by becoming dark in dark mode unless the RequestedTheme property is overridden in App.xaml or maybe MainWindow.xaml |
Must |
Provide an API on the Window class to control the title bar dark mode setting—not sure how useful this would be |
Could |
Mockups
With titlebar accent color enabled in personalization settings | Titlebar color settings disabled |
---|---|
Open Questions
It is not clear to me how it would determine whether to use light or dark mode title bar if the app’s theme were overridden. It doesn’t look like the Window
class has a RequestedTheme
property (but it probably should, like Page
?), so it might have to depend only on the app-level setting.
I know a lot of others are interested in greater titlebar customization like in UWP, but I think this is a good place to start for the titlebar.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:43
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Support Dark and Light themes in Win32 apps
Win32 apps often don't support Dark mode, so Windows gives Win32 apps a light title bar by default. However, for any app that...
Read more >Dark Title Bar in Dark Theme for Windows Version
Win32 apps often don't support Dark mode, so Windows gives Win32 apps a light title bar by default. However, for any app that...
Read more >Question - dark mode menu bar
Win32 apps often don't support Dark mode, so Windows gives Win32 apps a light title bar by default. However, for any app that...
Read more >Support dark theme on Windows - Sublime Forum
Support system wide dark theme on Windows. Right now, when I use dark mode on Windows, the window title border and menu are...
Read more >Why Doesn't Microsoft Use Win32 To Make Apps?
This is the likely reason why dark mode isn't implemented in msstyles/uxtheme yet, because it could break older applications that hardcode ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Agreed—thing is, having the normal Win32 title bar dark mode-aware would be a nice stopgap without having to make any new APIs in WinUI until a better title bar could be made. If there were going to be a “modernized” title bar, I would hope it would be exactly identical to the UWP title bar—not a crude imitation like in Windows Terminal.
We have implemented this internally and it will be in the next preview release. We’ll also have support for customizing the title bar more (like you could in UWP) for WinUI 3 Desktop apps, so stay tuned for much better title bars.