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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Keep Hint text from appearing at top of field when user enters text

Thread ID:





149917 Dec 13,2019 09:11 PM UTC Dec 17,2019 05:49 AM UTC Xamarin.Forms 3
Tags: SfTextInputLayout
Brian Swanson
Asked On December 13, 2019 09:11 PM UTC

I am trying to build a style for SfTextInput that will have Hint text in the field but I don't want the Hint text to move to the top of the field when the user starts to enter text (I would like the hint text to go away once a user enters text but reappear if the user clears the field). I have pasted in my test code and two images.

    <StackLayout x:Name="InputContainer" VerticalOptions="StartAndExpand" Padding="10, 0, 10, 0">
        <inputLayout:SfTextInputLayout x:Name="TextInputLayout" Style="{DynamicResource SfTextInputStyle}" Hint="Enter Your Answer" IsHintAlwaysFloated="False">
            <Editor x:Name="TextInput" TextChanged="TextChanged" Unfocused="TextInputUnfocused" AutoSize="TextChanges" />

Thanks for your help,

Brian Swanson

Attachment: Archive_a02acfa4.zip

Rachel A [Syncfusion]
Replied On December 16, 2019 05:34 AM UTC

Hi Brian, 
Greetings from Syncfusion. 
We can retain the position of the hint text inside the container itself by setting EnableFloating property as false same as in the below code snippet. 
  <textinputlayout:SfTextInputLayout EnableFloating="False" Hint="Type Text"> 
        <Entry ></Entry> 
For more information on hint text, refer the below documentation link. 

Brian Swanson
Replied On December 16, 2019 04:15 PM UTC


Thank you. That worked.

- Brian

Lakshmi Radha Krishnan [Syncfusion]
Replied On December 17, 2019 05:49 AM UTC

Hi Brian,

We are glad that the provided solution works.

Lakshmi R.


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