Open lolametro opened 3 weeks ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
@codendone i tested with v1.6-exp2 and it seems that this issue fixed. so i think this issue can be closed
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).