diff --git a/WinUIGallery/Samples/SamplePages/SampleSystemBackdropsWindow.xaml.cs b/WinUIGallery/Samples/SamplePages/SampleSystemBackdropsWindow.xaml.cs index b1a61a000..0fa29890d 100644 --- a/WinUIGallery/Samples/SamplePages/SampleSystemBackdropsWindow.xaml.cs +++ b/WinUIGallery/Samples/SamplePages/SampleSystemBackdropsWindow.xaml.cs @@ -8,6 +8,8 @@ using Microsoft.UI; using Microsoft.UI.Composition; using System; +using Windows.UI.ViewManagement; +using Microsoft.UI.System; namespace WinUIGallery.SamplePages; @@ -124,7 +126,8 @@ bool TrySetMicaBackdrop(bool useMicaAlt) if (MicaController.IsSupported()) { // Hooking up the policy object. - configurationSource = new SystemBackdropConfiguration(); + configurationSource = new SystemBackdropConfiguration(); + configurationSource.IsHighContrast = ThemeSettings.CreateForWindowId(this.AppWindow.Id).HighContrast; Activated += Window_Activated; Closed += Window_Closed; ((FrameworkElement)Content).ActualThemeChanged += Window_ThemeChanged; @@ -200,6 +203,7 @@ private void Window_ThemeChanged(FrameworkElement sender, object args) private void SetConfigurationSourceTheme() { + configurationSource.IsHighContrast = ThemeSettings.CreateForWindowId(this.AppWindow.Id).HighContrast; configurationSource.Theme = (SystemBackdropTheme)((FrameworkElement)Content).ActualTheme; }