Skip to main content

EditBase.ErrorIcon Property

Specifies the error icon image.

Namespace: DevExpress.XamarinForms.Editors

Assembly: DevExpress.XamarinForms.Editors.dll

NuGet Package: DevExpress.XamarinForms.Editors

Declaration

public ImageSource ErrorIcon { get; set; }

Property Value

Type Description
ImageSource

Icon image.

Remarks

The error icon appears in the edit box when the editor is in an error state (HasError property is true).

Use the ErrorIconColor and ErrorColor properties to specify the color of the error icon, borders, label, and error message. To set the custom image for the error icon, follow the steps below:

  1. Add the icon file (for example, icon.png) to your platform-specific projects:

    • Android
      Add the icon file to the Resources/drawable folder.
    • iOS
      Double-click the Assets.xcassets asset catalog, create a new icon image set, and add the icon to this image set.
  2. Assign the icon to the ErrorIcon property:

    <dxe:TextEdit ErrorIcon = "icon"/>
    

The following settings allow you to set the action that occurs when a user taps the error icon:

Property/Event

Description

ErrorIconClicked

Occurs when a user taps the error icon.

ErrorIconCommand

Specifies the command executed when a user taps the error icon.

ErrorIconCommandParameter

Specifies the parameter passed to the ErrorIconCommand.

See Also