Hi Geoff,
Greetings from Syncfusion.
Query 1: Is there a
way to have separate colours for the Hint and Outline?
Yes, you can provide
different color for the Hint and Outline in the SfTextInputLayout using the unique
color key specified in the SyncfusionThemeDictionary. Please refer the below
code snippet.
Reference Link:
https://help.syncfusion.com/xamarin/themes/keys#sftextinputlayout
Code Snippet:
App.xaml:
<Application.Resources>
<syncTheme:SyncfusionThemeDictionary>
<syncTheme:SyncfusionThemeDictionary.MergedDictionaries> <ResourceDictionary> <x:String
x:Key="SfTextInputLayoutTheme">CustomTheme</x:String> <Color
x:Key="SyncPrimaryLightColor">Green</Color> <Color
x:Key="SyncPrimaryColor">Red</Color> <Color
x:Key="SfTextInputLayoutHintColor">Blue</Color> <Color
x:Key="SfTextInputLayoutLineColor">Aqua</Color> </ResourceDictionary>
</syncTheme:SyncfusionThemeDictionary.MergedDictionaries>
</syncTheme:SyncfusionThemeDictionary> </Application.Resources>
|
Query 2: Can the Hint size and Outline thickness be
configured?
You can change the
hint size using the FontSize property in the HintLabelStyle property and the
outline thickness can be changed using the FocusedStrokeWidth and UnfocusedStrokeWidth
property. Please check the reference link.
Link:
https://help.syncfusion.com/xamarin/sftextinputlayout/how-to#customize-the-thickness-of-stroke
https://help.syncfusion.com/xamarin/sftextinputlayout/custom-font#hint
Code Snippet:
Xaml:
<inputLayout:SfTextInputLayout
Hint="Hint" ContainerType="Outlined"
FocusedStrokeWidth="4" UnfocusedStrokeWidth="4">
<inputLayout:SfTextInputLayout.HintLabelStyle> <inputLayout:LabelStyle
FontSize="15"/>
</inputLayout:SfTextInputLayout.HintLabelStyle> <Entry /> </inputLayout:SfTextInputLayout>
|
We have attached the
sample, please download it from the following location.
Sample: https://www.syncfusion.com/downloads/support/forum/148404/ze/TextInputLayoutSample1790275936
Please let us know if
you need further assistance on this.
Regards,
Lakshmi R.
<inputLayout:SfTextInputLayout EnableFloating="False" Hint="Name">
<Entry />
</inputLayout:SfTextInputLayout> |