Skip to content

Keep the Button HorizontalAlignment be Stretch in Fluent style - #10082

Open
lindexi wants to merge 2 commits into
dotnet:mainfrom
dotnet-campus:t/lindexi/FluentButtonHorizontalAlignmentStyle
Open

lindexi wants to merge 2 commits into
dotnet:mainfrom
dotnet-campus:t/lindexi/FluentButtonHorizontalAlignmentStyle

Conversation

@lindexi

@lindexi lindexi commented Nov 17, 2024 •

Copy link
Copy Markdown
Member

Fixes #10077

Description

In the Fluent style, ensure that the HorizontalAlignment property of buttons is set to Center. This helps maintain consistent behavior with previous styles.

Customer Impact

Maintaining consistent behavior allows developers to more easily apply the Fluent theme without worrying about layout changes due to style switches.

Regression

See #8870

Testing

Just CI and Snoop

Risk

Low. This potentially breaking scenarios where buttons relying on the Fluent style are left-aligned. Therefore, I believe the sooner this change is merged, the lower the risk will be, as fewer developers will depend on buttons being left-aligned.

Microsoft Reviewers: Open in CodeFlow

@lindexi
lindexi requested review from a team as code owners November 17, 2024 02:08
@dotnet-policy-service dotnet-policy-service Bot added PR metadata: Label to tag PRs, to facilitate with triage Community Contribution A label for all community Contributions labels Nov 17, 2024
@h3xds1nz

Copy link
Copy Markdown
Member

@lindexi Run the theme generator (ThemeGenerator.Fluent.ps1) so it is propagated.

@dipeshmsft

Copy link
Copy Markdown
Member

@lindexi both HorizontalAlignment and VerticalAlignment should be Stretch, or rather we can just remove them, as the default value is Stretch.

Can you make the above changes ? Once that is done, we need to run ThemeGenerator.Fluent.ps1 script as well to propagate the changes. Once that is done, I will take this PR ahead.

@lindexi lindexi changed the title Keep the Button HorizontalAlignment be Center in Fluent style Keep the Button HorizontalAlignment be Stretch in Fluent style May 21, 2025
@lindexi
lindexi force-pushed the t/lindexi/FluentButtonHorizontalAlignmentStyle branch from 53707e8 to 0eda36c Compare May 21, 2025 02:51
@lindexi

lindexi commented May 21, 2025

Copy link
Copy Markdown
Member Author

@dipeshmsft OK, I update it.

lindexi added a commit to lindexi/lindexi_gd that referenced this pull request May 21, 2025
@codecov

codecov Bot commented May 21, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 13.47351%. Comparing base (d4436f7) to head (0eda36c).

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #10082         +/-   ##
===================================================
+ Coverage   13.43439%   13.47351%   +0.03911%     
===================================================
  Files           3317        3317                 
  Lines         664749      664749                 
  Branches       74643       74643                 
===================================================
+ Hits           89305       89565        +260     
+ Misses        572854      572582        -272     
- Partials        2590        2602         +12     
Flag Coverage Δ
Debug 13.47351% <ø> (+0.03911%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 3, 2026
initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 3, 2026
initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 3, 2026
initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 4, 2026
initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 4, 2026
initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 4, 2026
initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 5, 2026
initial-force-wpf-bot Bot pushed a commit to InitialForce/wpf that referenced this pull request Nov 5, 2026
initial-force-wpf-bot Bot added a commit to InitialForce/wpf that referenced this pull request Nov 5, 2026
cherry-pick: Keep the Button HorizontalAlignment be Stretch in Fluent style (upstream dotnet#10082)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage Win 11 Theming

Projects

Status: 🥅 Todo

Development

Successfully merging this pull request may close these issues.

Setting ThemeMode on a window causes a button to be positioned differently

3 participants