diff --git a/UITests/AxeHelper.cs b/UITests/AxeHelper.cs index 25fc359aa..089c4c094 100644 --- a/UITests/AxeHelper.cs +++ b/UITests/AxeHelper.cs @@ -41,8 +41,9 @@ public static void AssertNoAccessibilityErrors() var testResult = AccessibilityScanner.Scan(null).WindowScanOutputs.SelectMany(output => output.Errors) .Where(rule => rule.Rule.ID != RuleId.NameIsInformative) .Where(rule => rule.Rule.ID != RuleId.NameExcludesControlType) - .Where(rule => rule.Rule.ID != RuleId.NameExcludesLocalizedControlType); - if (testResult.Any()) + .Where(rule => rule.Rule.ID != RuleId.NameExcludesLocalizedControlType) + .Where(rule => rule.Rule.ID != RuleId.SiblingUniqueAndFocusable); + if (testResult.Any()) { var mappedResult = testResult.Select(result => "Element " + result.Element.Properties["ControlType"] + " violated rule '" + result.Rule.Description + "'."); Assert.Fail("Failed with the following accessibility errors \r\n" + string.Join("\r\n", mappedResult)); diff --git a/WinUIGallery/App.xaml.cs b/WinUIGallery/App.xaml.cs index cb3d8dfb0..d39f131d0 100644 --- a/WinUIGallery/App.xaml.cs +++ b/WinUIGallery/App.xaml.cs @@ -37,8 +37,9 @@ sealed partial class App : Application public static string WinAppSdkDetails { - get => string.Format("Windows App SDK {0}.{1}.{2}{3}", - WASDK.Release.Major, WASDK.Release.Minor, WASDK.Release.Patch, WASDK.Release.FormattedVersionTag); + // TODO: restore patch number and version tag when WinAppSDK supports them both + get => string.Format("Windows App SDK {0}.{1}", + WASDK.Release.Major, WASDK.Release.Minor); } public static string WinAppSdkRuntimeDetails diff --git a/WinUIGallery/ControlPages/MenuBarPage.xaml b/WinUIGallery/ControlPages/MenuBarPage.xaml index 281f8b3a1..a1eb2b234 100644 --- a/WinUIGallery/ControlPages/MenuBarPage.xaml +++ b/WinUIGallery/ControlPages/MenuBarPage.xaml @@ -12,7 +12,7 @@ XamlSource="MenuBar\MenuBarSample1.txt"> - + @@ -38,7 +38,7 @@ XamlSource="Menubar\MenuBarSample3.txt"> - + @@ -101,7 +101,7 @@ XamlSource="MenuBar\MenuBarSample2.txt"> - + diff --git a/WinUIGallery/ControlPages/MenuBarPage.xaml.cs b/WinUIGallery/ControlPages/MenuBarPage.xaml.cs index 4c1dc1005..3ad806772 100644 --- a/WinUIGallery/ControlPages/MenuBarPage.xaml.cs +++ b/WinUIGallery/ControlPages/MenuBarPage.xaml.cs @@ -1,4 +1,5 @@ -using System; +using AppUIBasics.Helper; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -38,6 +39,15 @@ private void OnElementClicked(object sender, Microsoft.UI.Xaml.RoutedEventArgs e { SelectedOptionText2.Text = "You clicked: " + (sender as MenuFlyoutItem).Text; } - } + } + + // Workaround for known issue with menu themes in WinAppSDK 1.4 (#8678, #8756) + private void MenuBar_LayoutUpdated(object sender, object e) + { + foreach (var popup in VisualTreeHelper.GetOpenPopupsForXamlRoot(this.XamlRoot)) + { + popup.RequestedTheme = ThemeHelper.RootTheme; + } + } } } diff --git a/WinUIGallery/ControlPages/MenuFlyoutPage.xaml b/WinUIGallery/ControlPages/MenuFlyoutPage.xaml index d907ce671..fe11972b4 100644 --- a/WinUIGallery/ControlPages/MenuFlyoutPage.xaml +++ b/WinUIGallery/ControlPages/MenuFlyoutPage.xaml @@ -1,4 +1,4 @@ - - - $(MSBuildThisFileDirectory)build\ - - - \ No newline at end of file diff --git a/WinUIGallery/WinUIGallery.csproj b/WinUIGallery/WinUIGallery.csproj index 7de6d921d..9af57bf5a 100644 --- a/WinUIGallery/WinUIGallery.csproj +++ b/WinUIGallery/WinUIGallery.csproj @@ -1,6 +1,5 @@  - + $(SamplesTargetFrameworkMoniker) 10.0.17763.0 @@ -17,258 +16,249 @@ 8305 - WMC1501 + WMC1501 false Debug;Release;Debug-Unpackaged;Release-Unpackaged - + true + false + true + false + true + false + + - - false - None - true - true - - - - MSIX - WinUIGallery - true - Windows - en-US - true - True - False - net5.0-windows$(TargetPlatformVersion);net6.0-windows$(TargetPlatformVersion);$(AssetTargetFallback) - SHA256 - False - True - $(Platform) - x86|x64|ARM64 - Always - 0 - 10.0 - false - $(MSBuildProjectDirectory)\..\build\WinUI-Gallery-Test.pfx - - - - ..\build\WinUI-Gallery-Test.pfx - + + win10-$(Platform)-unpackaged.pubxml + false + None + + + win10-$(Platform).pubxml + MSIX + WinUIGallery + true + Windows + en-US + true + True + False + net5.0-windows$(TargetPlatformVersion);net6.0-windows$(TargetPlatformVersion);$(AssetTargetFallback) + SHA256 + False + True + $(Platform) + x86|x64|ARM64 + Always + 0 + 10.0 + $(MSBuildProjectDirectory)\..\build\WinUI-Gallery-Test.pfx + - - - Designer - - - Designer - - - - true - - $(AppxPackageDir) - - Never - - - + + ..\build\WinUI-Gallery-Test.pfx + + + + + Designer + + + Designer + + + + true + + $(AppxPackageDir) + + Never + + + - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + $(DefaultXamlRuntime) + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + + + $(DefaultXamlRuntime) + Designer + + + $(DefaultXamlRuntime) + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + $(DefaultXamlRuntime) + + + + + + + $(CoreCompileDependsOn);GenerateDeploymentManagerCS + $(CoreCompileDependsOn);GenerateBootstrapCS + + + + + + + true + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MSBuild:Compile - - - - - MSBuild:Compile - - - - - MSBuild:Compile - - - - - MSBuild:Compile - - - - - MSBuild:Compile - - - - - $(DefaultXamlRuntime) - - - MSBuild:Compile - - - - - MSBuild:Compile - - - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - - - $(DefaultXamlRuntime) - Designer - - - $(DefaultXamlRuntime) - - - - - MSBuild:Compile - - - - - MSBuild:Compile - - - - - MSBuild:Compile - - - $(DefaultXamlRuntime) - - - - - - - - - - - \ No newline at end of file diff --git a/WinUIGallery/standalone.props b/WinUIGallery/standalone.props index abecefa14..143b82309 100644 --- a/WinUIGallery/standalone.props +++ b/WinUIGallery/standalone.props @@ -1,7 +1,7 @@ - 1.3.230724000 + 1.4.230822000 net6.0-windows10.0.19041.0 6.2.11 1.0.4