We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 918a7b9 commit 2007272Copy full SHA for 2007272
Utilities.cs
@@ -1,5 +1,6 @@
1
using Microsoft.UI;
2
using Microsoft.UI.Composition.SystemBackdrops;
3
+using Microsoft.UI.Windowing;
4
using Microsoft.UI.Xaml;
5
using Microsoft.UI.Xaml.Media;
6
using System;
@@ -52,6 +53,8 @@ public static void SetThemeColor(this Window window)
52
53
if (window.Content is FrameworkElement rootElement)
54
{
55
rootElement.RequestedTheme = Enum.Parse<ElementTheme>(appearance);
56
+ appearance = appearance == "Default" ? "UseDefaultAppMode" : appearance;
57
+ window.AppWindow.TitleBar.PreferredTheme = Enum.Parse<TitleBarTheme>(appearance);
58
}
59
60
0 commit comments