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

sftextinputlayout Change Line Color

Thread ID:

Created:

Updated:

Platform:

Replies:

144617 May 14,2019 08:49 PM UTC May 15,2019 09:20 AM UTC Xamarin.Forms 1
loading
Tags: SfTextInputLayout
Clay Zuvich
Asked On May 14, 2019 08:49 PM UTC

Is it possible to change the line color drawn underneath the TextEntry on the SfTextInputLayout control? If so, is it possible to change the line drawn without changing the HelperText color?  Thanks!

Bharathiraja K [Syncfusion]
Replied On May 15, 2019 09:20 AM UTC

Hi Clay, 
 
Greetings from Syncfusion. You can set the line color by overriding the default value of “SyncPrimaryColor” key which is used to change the color of line when TextInputLayout is focused.   
   
To set the same color for line when TextInputLayout is unfocused, you can override the default value of “SfTextInputLayoutLineColor” key.  
     
Please find the code snippet:  
[XAML]: 
<ContentPage.Resources> 
        <syncTheme:SyncfusionThemeDictionary> 
            <syncTheme:SyncfusionThemeDictionary.MergedDictionaries> 
                <ResourceDictionary> 
                    <x:String x:Key="SfTextInputLayoutTheme">CustomTheme</x:String>  
                    <Color x:Key="SyncPrimaryColor">Green</Color> 
                    <Color x:Key="SfTextInputLayoutLineColor">Green</Color> 
                </ResourceDictionary> 
            </syncTheme:SyncfusionThemeDictionary.MergedDictionaries> 
        </syncTheme:SyncfusionThemeDictionary> 
    </ContentPage.Resources> 
    <StackLayout> 
        <inputLayout:SfTextInputLayout  
            Hint="Password"  
            EnablePasswordVisibilityToggle="true"> 
            <Entry Text="John"/> 
        </inputLayout:SfTextInputLayout> 
    </StackLayout> 
 
We have created a sample for your requirement, and it can be downloaded from the below link:  
   
 
To know more details about this, please refer the below links.  
   
   
   
Please let us know if you have any concern.  
   
Regards,  
Bharathi. 


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