Fixed Hint Position in .NET MAUI Text Input Layout (SfTextInputLayout)
22 Sep 20253 minutes to read
Hint label for the text input layout is always fixed at the top position. This helps users make the hint label float even when the input view is not focused. It can be enabled by setting the IsHintAlwaysFloated property.
NOTE
The default value of theIsHintAlwaysFloatedisfalse.
Filled
The hint label position of the input view will be set always at the top for the Filled container type.
<inputLayout:SfTextInputLayout Hint="Name"
IsHintAlwaysFloated="true"
ContainerType="Filled">
<Entry />
</inputLayout:SfTextInputLayout>SfTextInputLayout inputLayout = new SfTextInputLayout();
inputLayout.Hint = "Name";
inputLayout.IsHintAlwaysFloated = true;
inputLayout.ContainerType = ContainerType.Filled;
inputLayout.Content = new Entry();
Outlined
The hint label position of the input view will be set always at the top for the Outlined container type.
<inputLayout:SfTextInputLayout Hint="Name"
IsHintAlwaysFloated="true"
ContainerType="Outlined">
<Entry />
</inputLayout:SfTextInputLayout>SfTextInputLayout inputLayout = new SfTextInputLayout();
inputLayout.Hint = "Name";
inputLayout.IsHintAlwaysFloated = true;
inputLayout.ContainerType = ContainerType.Outlined;
inputLayout.Content = new Entry();
None
The hint label position of the input view will be set always at the top for the None container type.
<inputLayout:SfTextInputLayout Hint="Name"
IsHintAlwaysFloated="true"
ContainerType="None">
<Entry />
</inputLayout:SfTextInputLayout>SfTextInputLayout inputLayout = new SfTextInputLayout();
inputLayout.Hint = "Name";
inputLayout.IsHintAlwaysFloated = true;
inputLayout.ContainerType = ContainerType.None;
inputLayout.Content = new Entry();