Skip to content

Conversation

@Alex4SSB
Copy link

Setting HorizontalAlignment=Right when FlowDirection is RightToLeft achieves the exact opposite of the desired if the RadioButton's parent is also set to RightToLeft. This apparently also prevents any derived styles (and even direct control properties) from changing this behavior.

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

A RadioButton that uses DefaultRadioButtonStyle and has both its own and parent's FlowDirection set to RightToLeft will be forced to visual left alignment with no way to change it. (RightToLeft switches the display of HorizontalAlignment so that left alignment actually becomes right alignment and vice versa)

What is the new behavior?

The style no longer forces HorizontalAlignment through FlowDirection trigger and lets the library user full control of this behavior.

Setting HorizontalAlignment=Right when FlowDirection is RightToLeft achieves the exact opposite of the desired if the RadioButton's parent is also set to RightToLeft. This apparently also prevents any derived styles (and even direct control properties) from changing this behavior.
@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request release labels Dec 20, 2025
@Alex4SSB Alex4SSB changed the title Remove FlowDirection Trigger from RadioButton.xaml fix(controls): Remove FlowDirection Trigger from RadioButton.xaml Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant