DefaultTitleBarShouldMatchAppModeTheme does not respect RequestedTheme #9711
Labels
area-TitleBar
Issues related to custom window title bars.
bug
Something isn't working
team-CompInput
Issue for IXP (Composition, Input) team
Describe the bug
AppWindow.DefaultTitleBarShouldMatchAppModeTheme
does not respect theApplication.RequestedTheme
(or((FrameworkElement)XamlRoot.Content).RequestedTheme
) settings.The title bar color would then still not match the actual theme used in the app.
Steps to reproduce the bug
AppWindow.DefaultTitleBarShouldMatchAppModeTheme = true
in theMainWindow
RequestedTheme = ApplicationTheme.Light
in theApp ctor
OR((FrameworkElement)Content.XamlRoot.Content).RequestedTheme = ElementTheme.Light
in theMainWindow
Expected behavior
See a light title bar, while the app is in light mode
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.6 Experimental 1: 1.6.240531000-experimental1
Windows version
Windows 11 (22H2): Build 22621
Additional context
This means it is not possible to dynamically switch the title bar color, based on the selection of the user in the app. Most apps offer this kind of setting (even Microsoft apps like Paint), meaning the
DefaultTitleBarShouldMatchAppModeTheme
will not fit their needs and still require custom code. An additional annoyance is, thatRequestedTheme
cannot be set at runtime, only in theApp
ctor (#4474).The text was updated successfully, but these errors were encountered: