-
Notifications
You must be signed in to change notification settings - Fork 776
Description
Describe the bug
When a TextBlock has FlowDirection="RightToLeft", the Padding values appear to be mirrored — the first padding value (intended for the left) is applied to the right instead.
<StackPanel> <TextBlock Text="Hello, World!" FlowDirection="RightToLeft" Padding="5,10,30,0" /> </StackPanel>
Why is this important?
I’m currently implementing a chat project. When using a Send icon inside a Label and applying Padding, the layout works as expected in LeftToRight mode. However, when FlowDirection is set to RightToLeft, the padding does not behave correctly — the left/right values are reversed.
Steps to reproduce the bug
- Run the attached code snippet.
- See the left and right padding for TextBlock.
- PaddingLeft (5) is applied to Padding Right.
Actual behavior
PaddingLeft (5) is applied to Padding Right.
Expected behavior
Padding value should not flipped. Instead Padding value 5 should be applied to Left padding.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.8.0: 1.8.250907003
Windows version
No response
Additional context
No response