Back to Devexpress

EditBase.ErrorColor Property

maui-devexpress-dot-maui-dot-editors-dot-editbase-b15a2a84.md

latest3.9 KB
Original Source

EditBase.ErrorColor Property

Gets or sets the color of the edit box’s borders, label, error icon, and error message if there is an input error. This is a bindable property.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public Color ErrorColor { get; set; }

Property Value

TypeDescription
Color

The color of editor borders, label, error message and error icon.

|

Remarks

The ErrorColor property specifies the color of editor borders, the label, ErrorText and ErrorIcon when the editor is in an error state (the HasError property is true). You can also use the ErrorIconColor property to specify an individual color for the error icon.

You can also use the following properties to configure the appearance and position of the editor’s error text:

|

Property

|

Description

| | --- | --- | |

BottomTextFontSize
BottomTextFontFamily
BottomTextFontAttributes

|

Configure font settings.

| |

ReserveBottomTextLine

|

Gets or sets whether to reserve a line to display error text.

| |

BottomTextTopIndent

|

Sets the distance between the editor’s help or error text and its bottom border.

|

These properties also affect HelpText. To set the help text color for different states, use the HelpTextColor/DisabledHelpTextColor properties.

Example

This example shows how to customize the appearance of an editor’s help/error text:

|

State/Appearance

|

Default

|

Custom

| | --- | --- | --- | |

Default

|

|

| |

Disabled

|

|

| |

Error

|

|

|

xml
<dxe:TextEdit BottomTextFontAttributes="Bold"
              BottomTextFontSize="18"
              BottomTextTopIndent="20"
              HelpText="Bottom text"
              HelpTextColor="Green"
              DisabledHelpTextColor="LightGreen"
              ErrorColor="Brown"
              ErrorText="Error text"/>

See Also

EditBase Class

EditBase Members

DevExpress.Maui.Editors Namespace