- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.2k
 
Open
Description
Description
In an Arabic (ar) environment, TextBlock Run behaves abnormally when displaying pure numbers.
Reproduction Steps
Create a new .NET 9 WPF application and add the following code:
    public MainWindow()
    {
        CultureInfo.CurrentUICulture = new CultureInfo("ar");
        this.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentUICulture.Name);
        this.FlowDirection = CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
        InitializeComponent();
    }
<Window
    x:Class="WpfApp1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="MainWindow"
    Width="800"
    Height="450"
    mc:Ignorable="d">
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
        <TextBlock FontSize="18" FontWeight="Bold">
            <Run d:Text="25.4.10.10" Text="99.99.99.99" />
            <LineBreak />
            <Run d:Text="801" Text="801" />
            <LineBreak />
            <Run d:Text="802" Text="802" />
            <LineBreak />
            <Run d:Text="803" Text="803" />
            <LineBreak />
        </TextBlock>
    </Grid>
</Window>
Expected behavior
Display numbers normally
Actual behavior
The displayed numbers are abnormal, like garbled text.
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
lindexi
Metadata
Metadata
Assignees
Labels
No labels