maui-404521-editors-labels.md
A label describes the purpose of the input field and guides users to enter relevant information. You can specify and configure a floating label above an editor (LabelText), assistive labels below the editor (HelpText and ErrorText), and affixed labels within the editor (Prefix and Suffix).
A floating label is a caption that informs users about the editor’s purpose. Use the LabelText property to specify the floating label text.
When the editor is out of focus, the label is used as a placeholder. After the editor gets focus, the label floats above the input field.
The floating label moves with a smooth animation effect. To prevent this behavior, set the AllowAnimation property to false. If you want to fix the label in the upper position, set the IsLabelFloating property to false.
Use LabelColor, FocusedLabelColor, and DisabledLabelColor properties to specify label colors for different editor states.
To configure label font settings, you can use LabelFontSize, TextFontFamily and TextFontAttributes properties.
You can specify and configure two assistive labels below an editor:
HelpTextA brief text that contains an editor description.ErrorTextA message shown when a validation error occurs (the editor’s HasError property is true).
Use the BottomTextTopIndent property to specify the indent between the editor’s bottom border and the help or error message.
To specify color and font attributes for assistive labels, use the following properties:
HelpTextColor | DisabledHelpTextColorSpecify the help text color for different states of an editor.ErrorColorSpecifies the error message text color.BottomTextFontSize | BottomTextFontFamily | BottomTextFontAttributesSpecify font settings.
If HelpText is not set, ErrorText may shift page content down when it appears. To prevent this behavior, set the ReserveBottomTextLine property to true.
You can specify labels displayed before and after the input string within an editor. For this purpose, use Prefix and Suffix properties.
To configure color and font attributes for affixed labels, use the following properties:
AffixColorSpecifies the prefix/suffix text color.AffixFontAttributes | AffixFontFamily | AffixFontSizeSpecify font settings.AffixIndentSpecifies a distance between the prefix/suffix and input text.