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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

HintText Padding center with Entry

Thread ID:

Created:

Updated:

Platform:

Replies:

146518 Aug 6,2019 11:15 PM UTC Aug 7,2019 06:00 PM UTC Xamarin.Forms 1
loading
Tags: SfTextInputLayout
Laerte Alexi
Asked On August 6, 2019 11:15 PM UTC

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

Attachment: PaddingHintText_c06f7a6f.zip

Lakshmi Radha Krishnan [Syncfusion]
Replied On 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">
            <inputLayout:SfTextInputLayout.InputViewPadding>
                 <OnPlatform x:TypeArguments="Thickness"
                                                        iOS="0,20,0,7"
                                                        Android="0,20,0,15"
                                                        WinPhone="0,20,0,15" />
            </inputLayout:SfTextInputLayout.InputViewPadding>
            <Entry Text="12345" x:Name="entry"/>
 </inputLayout:SfTextInputLayout>

 

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.

Regards,

Lakshmi R.

 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon