dotnet / dotnet/wpf

FlowDirection change the validation style of textbox

Open
#11,274 1 comment 0 reactions 0 assignees View on GitHub
Investigate Win 11 Theming
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

Validation style of textbox does not appear correct when set FlowDirection

```xaml














```

Image

### Reproduction Steps

run the application with arabic culture
```c#
var culture = new CultureInfo("ar-Ye");

Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
CultureInfo.DefaultThreadCurrentCulture = culture;
CultureInfo.DefaultThreadCurrentUICulture = culture;

//Get the FlowDirection for current Culture
var flowDirection = CultureInfo.CurrentCulture.TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;

//Set the FlowDirection for all controls
FrameworkElement.FlowDirectionProperty.OverrideMetadata(typeof(FrameworkElement), new
FrameworkPropertyMetadata(flowDirection));
```

then set on textbox
```xaml
FlowDirection="LeftToRight"
```

### Expected behavior

To be like

Image

### Actual behavior

Image

### Regression?

it happen in dotnet 10

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

dotnet 10
windows 11 - default display language is English
x64

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.