EditBase.LabelText Property

Gets or sets the editor's label text.

Namespace: DevExpress.XamarinForms.Editors

Assembly: DevExpress.XamarinForms.Editors.dll

Declaration

public string LabelText { get; set; }

Property Value

Type Description
String

The editor's label text.

Remarks

A label is a short text that informs users about the purpose of the editor. Use the LabelText property to specify the label text.

BoxMode = Outlined
 

BoxMode = Filled
 

Label Behavior

The position of the label depends on the editor state:

  • When an editor is empty and not focused, the label is displayed within the editor box.
  • When the editor gets focus, the label moves to the top edge of the editor box and stays there if text is entered.

To pin the label to the top of the editor box, set the IsLabelFloating property to false.

Label Appearance

A label font family and attributes depend on the editor's TextFontFamily and TextFontAttributes properties. To specify the font size for a label displayed near the top of the editor box, use the LabelFontSize property.

You can also customize label text color in different states with the LabelColor, FocusedLabelColor and DisabledLabelColor properties.

Examples

This example shows how to change the label text color and adjust font settings:

State

Appearance

Unfocused

Focused

<dxe:TextEdit IsLabelFloating = "False"
              LabelText="Login"
              LabelColor="#404040"
              LabelFontSize="20"
              FocusedLabelColor="#404040"
              BorderColor=" #fe7c00"
              FocusedBorderColor="#a5a5a5"/>
See Also