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
close icon

sftextinputlayout Change Line Color

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!

1 Reply

BK Bharathiraja K Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon