[Deps]Upgrade WpfUI to preview.9 and fix Windows 10 background issue (#29884)

* Bumping to preview9
This commit is contained in:
Niels Laute
2023-11-16 17:37:21 +01:00
committed by GitHub
parent 468e55c7e1
commit 412550abcd
9 changed files with 36 additions and 12 deletions

View File

@@ -16,7 +16,6 @@
ExtendsContentIntoTitleBar="True"
Icon="/PowerToys.ImageResizer;component/Resources/ImageResizer.ico"
ResizeMode="NoResize"
WindowBackdropType="Mica"
WindowCornerPreference="Default"
WindowStartupLocation="CenterScreen">

View File

@@ -5,6 +5,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Common.UI;
using ImageResizer.ViewModels;
using Microsoft.Win32;
using Wpf.Ui.Controls;
@@ -17,7 +18,17 @@ namespace ImageResizer.Views
public MainWindow(MainViewModel viewModel)
{
DataContext = viewModel;
Wpf.Ui.Appearance.Watcher.Watch(this);
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
if (OSVersionHelper.IsWindows11())
{
WindowBackdropType = WindowBackdropType.Mica;
}
else
{
WindowBackdropType = WindowBackdropType.None;
}
InitializeComponent();
}