Skip to content

Enable AppBarButton label font size customization - #11660

Open
Rashmi Thakur (rashmi-thakurr) wants to merge 1 commit into
mainfrom
fix/appbarbutton-label-fontsize-resource
Open

Enable AppBarButton label font size customization#11660
Rashmi Thakur (rashmi-thakurr) wants to merge 1 commit into
mainfrom
fix/appbarbutton-label-fontsize-resource

Conversation

@rashmi-thakurr

Copy link
Copy Markdown
Contributor

Description

Fixes #9328.

Adds an AppBarButtonLabelFontSize lightweight styling resource so applications can customize the AppBarButton label font size without copying and replacing the complete control template.

The default value remains 12, preserving the existing appearance.

Changes

  • Added AppBarButtonLabelFontSize to the Default, Light, and High Contrast theme dictionaries.
  • Updated the standard AppBarButton template to use the new resource.
  • Updated the optimized 2026 AppBarButton template for consistent behavior.
  • Extended VerifyAppBarButtonLightweightStyling to verify that an overridden font size is applied to the rendered label.

Validation

  • Built Microsoft.UI.Xaml.Controls.vcxproj successfully.
  • Built MUXControlsTestApp.csproj successfully.
  • Ran VerifyAppBarButtonLightweightStyling:
    • Passed
    • Confirmed an override value of 18 is applied to the rendered TextLabel.
    • Confirmed existing AppBarButton lightweight styling assertions continue to pass.

Visual impact

There is no default visual change. The AppBarButton label remains at 12 unless an application overrides AppBarButtonLabelFontSize.

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>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the needs-triage Issue needs to be triaged by the area owners label Aug 26, 2026
@rashmi-thakurr
Rashmi Thakur (rashmi-thakurr) marked this pull request as ready for review August 26, 2026 14:32
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@harshit7962 Harshit (harshit7962) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-triage Issue needs to be triaged by the area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Provide a ThemeResource binding for AppBarButton's FontSize instead of hardcoding it to 12

3 participants