Flipped default Settings Card Action Icon in RTL contexts#855
Conversation
|
@Avid29 ActionIcon can be changed by the developer to pretty much any ic9n. I eonder if in some, or most uses cases, you do not want that icon to be flipped. Is there an event where we detect RTL and we check if the default glyph is set and if so we set the RTL version of the glyph instead? If not we leave it alone? |
|
@niels9001 This PR only flips the default icon. It works because the |
There was a problem hiding this comment.
Pull request overview
This PR fixes the default SettingsCard.ActionIcon chevron so it mirrors in RTL contexts, matching the Windows Settings behavior described in issue #846.
Changes:
- Sets a default
ActionIconinstance to aFontIconwithMirroredWhenRightToLeft=true. - Keeps the default glyph as
\uE974while enabling RTL-aware rendering.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public SettingsCard() | ||
| { | ||
| this.DefaultStyleKey = typeof(SettingsCard); | ||
|
|
||
| // This is perhaps indicative of an issue with the action icon requiring a concrete FontElement instead of a template | ||
| ActionIcon = new FontIcon { Glyph = "\ue974", MirroredWhenRightToLeft = true }; | ||
| } |
|
|
||
| // This is perhaps indicative of an issue with the action icon requiring a concrete FontElement instead of a template | ||
| ActionIcon = new FontIcon { Glyph = "\ue974", MirroredWhenRightToLeft = true }; |
| { | ||
| this.DefaultStyleKey = typeof(SettingsCard); | ||
|
|
||
| // This is perhaps indicative of an issue with the action icon requiring a concrete FontElement instead of a template |
| this.DefaultStyleKey = typeof(SettingsCard); | ||
|
|
||
| // This is perhaps indicative of an issue with the action icon requiring a concrete FontElement instead of a template | ||
| ActionIcon = new FontIcon { Glyph = "\ue974", MirroredWhenRightToLeft = true }; |
Fixes #846
PR Type
What kind of change does this PR introduce?
Bugfix
What is the current behavior?
The default
ActionIconis a chevron that points right, regardless of the FlowDirectionWhat is the new behavior?
The default
ActionIconis a chevron that points outwards, flipping based on the FlowDirectionPR Checklist
Please check if your PR fulfills the following requirements:
Other information
I'm not terribly happy with this solution. I think this poor solution represents an issue that the action icon maybe should be templated.