Skip to content

TextBlock.Padding left/right values are mirrored when FlowDirection="RightToLeft" #10782

@Dhivya-SF4094

Description

@Dhivya-SF4094

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

  1. Run the attached code snippet.
  2. See the left and right padding for TextBlock.
  3. 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

Metadata

Metadata

Assignees

Labels

closed-ByDesignDescribed behavior is by design.team-ControlsIssue for the Controls team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions