Back to Devexpress

EditBase.IsLabelFloating Property

maui-devexpress-dot-maui-dot-editors-dot-editbase-776629ea.md

latest2.1 KB
Original Source

EditBase.IsLabelFloating Property

Gets or sets whether the label changes its position depending on the editor state, or it is pinned to the top of the editor box. This is a bindable property.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public bool IsLabelFloating { get; set; }

Property Value

TypeDefaultDescription
Booleantrue

true to enable the behavior when the label position depends on the editor state; otherwise, false.

|

Remarks

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.

Example

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

|

State

|

Appearance

| | --- | --- | |

Unfocused

|

| |

Focused

|

|

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

See Also

EditBase Class

EditBase Members

DevExpress.Maui.Editors Namespace