Right-to-Left in Xamarin Text Input Layout (SfTextInputLayout)

18 May 20211 minute to read

The TextInputLayout supports to change the flow of text to the right-to-left direction by setting the FlowDirection to RightToLeft.

NOTE

A specific platform setup is required to enable the right-to-left localization. For platform settings, refer to this documentation.

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:inputLayout="clr-namespace:Syncfusion.XForms.TextInputLayout;assembly=Syncfusion.Core.XForms"
             x:Class="TextInputLayout.MainPage">

    <StackLayout>
       <inputLayout:SfTextInputLayout
            x:Name="textinputlayout" 
            FlowDirection="RightToLeft"
            ContainerType="Outlined"
            Hint="اسم"  
            HelperText="أدخل أسمك" >
            <Entry />
        </inputLayout:SfTextInputLayout>
    </StackLayout>

</ContentPage>
textinputlayout.FlowDirection = FlowDirection.RightToLeft;
textinputlayout.ContainerType = ContainerType.Outlined;
textinputlayout.Hint = "اسم";
textinputlayout.HelperText = "أدخل أسمك";
textinputlayout.InputView = new Entry();

Xamarin Forms TextInputLayout with right to left