-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
InvestigateRequires further investigation by the WPF team.Requires further investigation by the WPF team.Win 11 Theming
Description
Description
Validation style of textbox does not appear correct when set FlowDirection
<Grid
Background="CadetBlue"
Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition
Width="*" />
<ColumnDefinition
Width="*" />
</Grid.ColumnDefinitions>
<StackPanel
Margin="10 0"
Grid.Row="0"
Grid.Column="0">
<TextBlock
Margin="0,4"
Text="Api url" />
<TextBox
FlowDirection="LeftToRight"
Text="{Binding ApiUrl}" />
</StackPanel>
<StackPanel
Margin="10 0"
Grid.Row="0"
Grid.Column="2">
<TextBlock
Margin="0,4"
Text="hub url" />
<TextBox
FlowDirection="LeftToRight"
Text="{Binding HubUrl}" />
</StackPanel>
</Grid>
Reproduction Steps
run the application with arabic culture
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
FlowDirection="LeftToRight"Expected behavior
To be like
Actual behavior
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
Metadata
Metadata
Assignees
Labels
InvestigateRequires further investigation by the WPF team.Requires further investigation by the WPF team.Win 11 Theming