Hi
Is it possible to change the font size of the hint so that it is easier to read when HintFloatMode is set to "Float" and the control has a value?If it is possible, can it be done in some sort of template that affects all SfTextInputLayout in the entire application or must it be done on every SfTextInputLayout?If it is possible to use a sort of template for the font size, is it then also possible to do this for the HintFloatMode so that all SfTextInputLayout in the entire application uses AlwaysFloat?
|
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="inputLayout:SfTextInputLayout">
<Setter Property="IsHintAlwaysFloated" Value="True" />
<Setter Property="HintLabelStyle">
<Setter.Value>
<inputLayout:LabelStyle FontSize="20" />
</Setter.Value>
</Setter>
<Setter Property="ContainerType" Value="Outlined" />
</Style>
</ResourceDictionary>
</ContentPage.Resources> |
Hi
WAUW Speedy answer thank you, but a bit too quick.
I'm using WPF not UWP, Xamarin, Android or iOS - sorry for clarifying that in my question, but I assumed that the WPF forum indicated that.
By replacing "IsHintAlwaysFloated" and "True" with "HintFloatMode" and "AlwaysFloat" that part of your answer works.
Unfortunately the part regarding font size does not. The property "HintLabelStyle" does not exist in WPF, nor does something with a similar name.
Therefore: Is it possible in WPF to alter the font size of the hint through a template, and if so how?
|
<Window.Resources>
<ResourceDictionary>
<Style TargetType="inputLayout:SfTextInputLayout">
<Setter Property="HintFloatMode" Value="AlwaysFloat" />
</Style>
<Style TargetType="TextBox">
<Setter Property="FontSize" Value="25" />
</Style>
</ResourceDictionary>
</Window.Resources>
<Grid Margin="0,20">
...
<inputLayout:SfTextInputLayout Grid.Row="0" Hint="Hint">
<TextBox Text="John" />
</inputLayout:SfTextInputLayout>
<inputLayout:SfTextInputLayout Grid.Row="1" Hint="Hint">
<TextBox Text="John" />
</inputLayout:SfTextInputLayout>
</Grid> |