-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Page Title is not shown in correct position for Right To Left Languages #13435
Description
Description
When FlowDirection is set to RightToLeft (FlowDirection="RightToLeft"), the page Title should be laid out near the right edge of the screen.
At the moment, for RightToLeft pages, the title is arranged at the left edge of screen.
Steps to Reproduce
1.Create a new MAUI app
2: Set android:SupportRtl="true" in androidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
2.set FlowDirection to RightToLeft for Shell and Page :
AppShell.xaml:
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="MauiApp34.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MauiApp34"
Shell.FlyoutBehavior="Disabled"
FlowDirection="RightToLeft">
<ShellContent
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
</Shell>
MainPage.xaml:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp34.MainPage"
FlowDirection="RightToLeft">
<VerticalStackLayout>
<Button Text="Click me"
HorizontalOptions="Start"
Margin="16">
</Button>
<Entry Text="Enter Data" Margin="16"
HorizontalOptions="FillAndExpand"/>
</VerticalStackLayout>
</ContentPage>
Current Behaviour :
At the moment, for RightToLeft pages, the title is arranged at the left edge of screen.
Expected behaviour :
When FlowDirection is set to RightToLeft (FlowDirection="RightToLeft"), the page Title should be laid out near the right edge of the screen.
Link to public reproduction project repository
https://github.com/hamiddd1980/Maui_Page_Title
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 8 -api 26
Did you find any workaround?
No response
Relevant log output
No response

