We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

HintText Padding center with Entry

I need center the Entry view between the HintText and Line (Border) of the TextInputLayout.
Example follows attach.

Attachment: PaddingHintText_c06f7a6f.zip

1 Reply

LR Lakshmi Radha Krishnan Syncfusion Team August 7, 2019 06:00 PM UTC

Hi Laerte,

Greetings from Syncfusion.


As per the material design specification, we have positioned the input view based on the ContainerType property. But you may adjust the input view of the SfTextInputLayout to the center of the hint label and border line using the InputViewPadding property. Please refer the below code snippet.

UG Link: https://help.syncfusion.com/xamarin/sftextinputlayout/container-type#custom-padding


Code Snippet:

<inputLayout:SfTextInputLayout x:Name="inputLayout" Hint="Senha" ContainerType="None">
                 <OnPlatform x:TypeArguments="Thickness"
                                                        WinPhone="0,20,0,15" />
            <Entry Text="12345" x:Name="entry"/>


By default, input view positioned at center for the other ContainerType (Filled and Outlined) property. So, you may set the above container type to position at center.

Please let us know if your requirement is different from this.


Lakshmi R.


Live Chat Icon For mobile
Up arrow icon