Upgrading to WASDK 1.8.5 and removing TitleBar workarounds (#45532)

- Upgrade to WASDK 1.8.5 that includes a fix for the `TitleBar` control.
- Remove the workaround from windows that use this control, as we can
set the `TitleBar` directly now
This commit is contained in:
Niels Laute
2026-02-24 13:01:44 +01:00
committed by GitHub
parent 6fe4361a20
commit e8ccb7099e
15 changed files with 34 additions and 73 deletions

View File

@@ -10,7 +10,7 @@
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.2.0" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.4188" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools.MSIX" Version="1.7.20250829.1" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.8.250907003" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.8.260209005" />
<PackageVersion Include="Shmuelie.WinRTServer" Version="2.1.1" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="System.Text.Json" Version="9.0.8" />

View File

@@ -31,14 +31,13 @@
IsBackButtonVisible="{x:Bind NavFrame.CanGoBack, Mode=OneWay}"
IsTabStop="False"
PaneToggleRequested="AppTitleBar_PaneToggleRequested">
<!-- This is a workaround for https://github.com/microsoft/microsoft-ui-xaml/issues/10374, once fixed we should just be using IconSource -->
<TitleBar.LeftHeader>
<ImageIcon
x:Name="WorkAroundIcon"
Height="16"
Margin="16,0,0,0"
Source="ms-appx:///Assets/icon.svg" />
</TitleBar.LeftHeader>
<TitleBar.Resources>
<!-- Override default WinUI 3 style -->
<x:Double x:Key="TitleBarCompactHeight">40</x:Double>
</TitleBar.Resources>
<TitleBar.IconSource>
<ImageIconSource ImageSource="ms-appx:///Assets/icon.svg" />
</TitleBar.IconSource>
</TitleBar>
<NavigationView
x:Name="NavView"

View File

@@ -44,7 +44,6 @@ public sealed partial class SettingsWindow : WindowEx,
this.SetIcon();
var title = RS_.GetString("SettingsWindowTitle");
this.AppWindow.Title = title;
this.AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall;
this.AppTitleBar.Title = title;
PositionCentered();
@@ -196,12 +195,10 @@ public sealed partial class SettingsWindow : WindowEx,
if (args.DisplayMode is NavigationViewDisplayMode.Compact or NavigationViewDisplayMode.Minimal)
{
AppTitleBar.IsPaneToggleButtonVisible = true;
WorkAroundIcon.Margin = new Thickness(8, 0, 16, 0); // Required for workaround, see XAML comment
}
else
{
AppTitleBar.IsPaneToggleButtonVisible = false;
WorkAroundIcon.Margin = new Thickness(16, 0, 8, 0); // Required for workaround, see XAML comment
}
}