[Chore] Upgrading to WinUIEx 2.2 (#26000)

* Upgrading to WinUIEx 2.2

* Replacing Mica

* Fix build

* Update notice.md

---------

Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
This commit is contained in:
Niels Laute 2023-06-05 17:21:48 +02:00 committed by GitHub
parent d426d9afde
commit 995a9ae7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 21 deletions

View File

@ -61,7 +61,7 @@
<PackageVersion Include="UnitsNet" Version="4.145.0" />
<PackageVersion Include="Vanara.PInvoke.User32" Version="3.4.11" />
<PackageVersion Include="Vanara.PInvoke.Shell32" Version="3.4.11" />
<PackageVersion Include="WinUIEx" Version="2.1.0" />
<PackageVersion Include="WinUIEx" Version="2.2.0" />
</ItemGroup>
<ItemGroup Condition="'$(IsExperimentationLive)'!=''">
<!-- Additional dependencies used by experimentation -->

View File

@ -334,5 +334,5 @@ SOFTWARE.
- UnitsNet 4.145.0
- Vanara.PInvoke.Shell32 3.4.11
- Vanara.PInvoke.User32 3.4.11
- WinUIEx 2.1.0
- WinUIEx 2.2.0

View File

@ -2,12 +2,7 @@
x:Class="FileLocksmithUI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:contract7NotPresent="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract,7)"
xmlns:contract7Present="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract,7)"
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
xmlns:converters1="using:PowerToys.FileLocksmithUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:interop="using:FileLocksmith.Interop"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="using:PowerToys.FileLocksmithUI.Views"
xmlns:winuiex="using:WinUIEx"
@ -18,9 +13,9 @@
IsShownInSwitchers="True"
IsTitleBarVisible="True"
mc:Ignorable="d">
<winuiex:WindowEx.Backdrop>
<winuiex:MicaSystemBackdrop />
</winuiex:WindowEx.Backdrop>
<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>
<Grid>
<Grid.RowDefinitions>

View File

@ -12,9 +12,9 @@
MinWidth="480"
MinHeight="320"
mc:Ignorable="d">
<winuiex:WindowEx.Backdrop>
<winuiex:MicaSystemBackdrop />
</winuiex:WindowEx.Backdrop>
<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32" />

View File

@ -11,9 +11,9 @@
xmlns:views="using:Peek.UI.Views"
xmlns:winuiex="using:WinUIEx"
mc:Ignorable="d">
<winuiex:WindowEx.Backdrop>
<winuiex:MicaSystemBackdrop />
</winuiex:WindowEx.Backdrop>
<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>
<Grid KeyboardAcceleratorPlacementMode="Hidden">
<Grid.KeyboardAccelerators>
<KeyboardAccelerator Key="Left" Invoked="LeftNavigationInvoked" />

View File

@ -189,7 +189,7 @@ namespace Peek.UI.Views
return;
}
var appWindow = MainWindow.GetAppWindow();
var appWindow = MainWindow.AppWindow;
if (AppWindowTitleBar.IsCustomizationSupported() && appWindow != null && appWindow.TitleBar.ExtendsContentIntoTitleBar)
{
var scale = MainWindow.GetMonitorScale();
@ -222,7 +222,7 @@ namespace Peek.UI.Views
{
if (AppWindowTitleBar.IsCustomizationSupported())
{
AppWindow appWindow = mainWindow.GetAppWindow();
AppWindow appWindow = mainWindow.AppWindow;
appWindow.TitleBar.ExtendsContentIntoTitleBar = true;
appWindow.TitleBar.ButtonBackgroundColor = Colors.Transparent;
appWindow.TitleBar.ButtonInactiveBackgroundColor = Colors.Transparent;

View File

@ -8,9 +8,9 @@
xmlns:winuiex="using:WinUIEx"
Closed="Window_Closed"
mc:Ignorable="d">
<winuiex:WindowEx.Backdrop>
<winuiex:MicaSystemBackdrop />
</winuiex:WindowEx.Backdrop>
<Window.SystemBackdrop>
<MicaBackdrop />
</Window.SystemBackdrop>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32" />