From dc367f353b930d7b1010494cc058cbb47a23c6d6 Mon Sep 17 00:00:00 2001 From: Rashmi Thakur Date: Wed, 26 Aug 2026 19:31:43 +0530 Subject: [PATCH] Enable AppBarButton label font size customization Add an AppBarButtonLabelFontSize lightweight resource to the standard and optimized styles, and cover overriding it in the existing common styles API test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- controls/dev/CommonStyles/APITests/CommonStylesTests.cs | 7 +++++-- controls/dev/CommonStyles/AppBarButton_themeresources.xaml | 5 ++++- .../CommonStyles/AppBarButton_themeresources_perf2026.xaml | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/controls/dev/CommonStyles/APITests/CommonStylesTests.cs b/controls/dev/CommonStyles/APITests/CommonStylesTests.cs index dbd4ff52ec..4af21f0785 100644 --- a/controls/dev/CommonStyles/APITests/CommonStylesTests.cs +++ b/controls/dev/CommonStyles/APITests/CommonStylesTests.cs @@ -373,6 +373,7 @@ public void VerifyAppBarButtonLightweightStyling() @" + 18 Collapsed @@ -382,9 +383,9 @@ public void VerifyAppBarButtonLightweightStyling() 14 -25,20,12,0 - + "); - + appBarButton = (AppBarButton)root.FindName("TestAppBarButton"); appBarButton = (AppBarButton)root.FindName("TestAppBarButton"); appBarButton.Loaded += (sender, args) => { appBarButtonLoadedEvent.Set(); }; Content = root; @@ -399,7 +400,9 @@ public void VerifyAppBarButtonLightweightStyling() Panel subItemChevronPanel = (Panel)GetVisualChildByName(appBarButton, "SubItemChevronPanel"); FontIcon subItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "SubItemChevron"); FontIcon overflowSubItemChevron = (FontIcon)GetVisualChildByName(appBarButton, "OverflowSubItemChevron"); + TextBlock textLabel = (TextBlock)GetVisualChildByName(appBarButton, "TextLabel"); + Verify.AreEqual(18.0, textLabel.FontSize); Verify.AreEqual((Visibility)root.Resources["AppBarButtonHasFlyoutChevronVisibility"], subItemChevronPanel.Visibility); Verify.AreEqual((string)root.Resources["AppBarButtonFlyoutGlyph"], subItemChevron.Glyph); diff --git a/controls/dev/CommonStyles/AppBarButton_themeresources.xaml b/controls/dev/CommonStyles/AppBarButton_themeresources.xaml index 60bcf2af4d..83055262b5 100644 --- a/controls/dev/CommonStyles/AppBarButton_themeresources.xaml +++ b/controls/dev/CommonStyles/AppBarButton_themeresources.xaml @@ -30,6 +30,7 @@ Visible + 12 8 12 -23,20,12,0 @@ -65,6 +66,7 @@ Visible + 12 8 12 -23,20,12,0 @@ -100,6 +102,7 @@ Visible + 12 8 12 -23,20,12,0 @@ -366,7 +369,7 @@ - + diff --git a/controls/dev/CommonStyles/AppBarButton_themeresources_perf2026.xaml b/controls/dev/CommonStyles/AppBarButton_themeresources_perf2026.xaml index c132a7bfd7..4449f5016a 100644 --- a/controls/dev/CommonStyles/AppBarButton_themeresources_perf2026.xaml +++ b/controls/dev/CommonStyles/AppBarButton_themeresources_perf2026.xaml @@ -30,6 +30,7 @@ Visible + 12 8 12 -23,20,12,0 @@ -65,6 +66,7 @@ Visible + 12 8 12 -23,20,12,0 @@ -100,6 +102,7 @@ Visible + 12 8 12 -23,20,12,0 @@ -344,7 +347,7 @@ - +