maui
maui copied to clipboard
Automatic Flow Direction Change for Arabic Strings in When Drawing the String in MAUI on Android and Opposite Behavior in Windows.
Description
In .NET MAUI, when drawing a string, Arabic strings undergo an automatic flow direction alteration. However, the Windows platform demonstrates different behavior when using the DrawString method from the canvas. This inconsistency interferes with the desired rendering of Arabic text when we manage the custom control coordinates for RTL and LTR internally, and it adversely affects the user experience.
Note: My device language is in LTR.
https://github.com/dotnet/maui/assets/97146406/507fd381-ba70-4bc5-baaf-260ab63e9684
Is there any way to detect the language as RTL or LTR from string type property?
Steps to Reproduce
Step 1: Create a sample in .NET MAUI Step 2: Develop a custom control that utilizes the DrawString method from the canvas. Step 3: Pass an Arabic string as the text to be drawn. Step 4: Execute the application on Android and Windows devices.
Link to public reproduction project repository
https://github.com/anandhan-rajagopal/RTLLanguageSample/tree/main
Version with bug
7.0.92
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 5.0 and above
Did you find any workaround?
NA
Relevant log output
NA
Verified this on Visual Studio Enterprise 17.8.0 Preview 1.0. Repro on Android 13.0-API33(8.0.0-preview.7.8842), not repro on Windows 11 and iOS 16.4 with below Project: RTLSample.zip
Any update on this issue? Please consider prioritizing this issue.
@jfversluis @davidortinau @PureWeen @jamesmontemagno @jsuarezruiz Guyz any workaround for this atleast?
Any update on this issue? Is there any workaround for this issue?
Any luck with dotnet 8 ?
Please provide a high priority for this issue to be resolved.
Is there any progress or recent information on this issue? Kindly prioritize its resolution with urgency.
Is there any update or workaround to resolve the issue? Please give high priority to resolve the issue ASAP.
@jfversluis @davidortinau @PureWeen @jamesmontemagno @jsuarezruiz Guyz, any update on this ?
Please prioritize its resolution with urgency.
Is there any update or workaround to resolve the issue? Please give high priority to resolve the issue ASAP.
Any update on this issue? Please prioritize its resolution.
Any update on this issue?
Can you please prioritize this issue?
Just add LTR char in XAML or in C# before the text for all TextBase controls
XAML: Text="‎سلام"
C#: Text="\u200Eسلام";