Skip to main content

Labels in DevExpress Data Editors for .NET MAUI

  • 2 minutes to read

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).

DevExpress Data Editors for MAUI - All labels

Floating Labels

A floating label is a caption that informs users about the editor’s purpose. Use the LabelText property to specify the floating label text.

DevExpress Data Editors for MAUI - Floating Labels

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.

Floating Labels Animation

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.

Assistive Labels

You can specify and configure two assistive labels below an editor:

HelpText
A brief text that contains an editor description.
ErrorText
A message shown when a validation error occurs (the editor’s HasError property is true).

DevExpress Data Editors for MAUI - Assistive Labels

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 | DisabledHelpTextColor
Specify the help text color for different states of an editor.
ErrorColor
Specifies the error message text color.
BottomTextFontSize | BottomTextFontFamily | BottomTextFontAttributes
Specify 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.

Affixed Labels

You can specify labels displayed before and after the input string within an editor. For this purpose, use Prefix and Suffix properties.

DevExpress Data Editors for MAUI - Affixed Labels

To configure color and font attributes for affixed labels, use the following properties:

AffixColor
Specifies the prefix/suffix text color.
AffixFontAttributes | AffixFontFamily | AffixFontSize
Specify font settings.
AffixIndent
Specifies a distance between the prefix/suffix and input text.