You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
ArabicIssue.mp4
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.
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.
ArabicIssue.mp4
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