Category / Section
How to apply LineBreakMode for labels in Xamarin Text Input Layout?
1 min read
Xamarin TextInputLayout allows us to set LineBreakMode for the hint, helper, error and counter labels via style.
The following example demonstrates how to set LineBreakMode for TextInputHintLabel, TextInputHelperLabel, TextInputErrorLabel and TextInputCounterLabel.
Code snippets [Xaml]:
<ContentPage.Resources> <Style TargetType="inputLayout:TextInputHintLabel"> <Setter Property="LineBreakMode" Value="TailTruncation" /> </Style> <Style TargetType="inputLayout:TextInputHelperLabel"> <Setter Property="LineBreakMode" Value="TailTruncation" /> </Style> <Style TargetType="inputLayout:TextInputErrorLabel"> <Setter Property="LineBreakMode" Value="TailTruncation" /> </Style> <Style TargetType="inputLayout:TextInputCounterLabel"> <Setter Property="LineBreakMode" Value="TailTruncation" /> </Style> </ContentPage.Resources>
Output:
Conclusion
I hope
you enjoyed learning on how to apply LineBreakMode for labels in XForms
Text Input Layout.
You
can refer to our Xamarin.Forms Text Input Layout feature tour page to know about its
other groundbreaking feature representations and documentation, and
how to quickly get started for configuration specifications. You can also
explore our Xamarin.Forms Text Input Layout example to understand how to create and
manipulate data.
For
current customers, you can check out our components from the License and Downloads page. If
you are new to Syncfusion, you can try our 30-day free trial to
check out our other controls.
If you have any
queries or require clarifications, please let us know in the comments section
below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We
are always happy to assist you!