Skip to main content

EditBase.ClearIcon Property

Specifies the clear icon image.

Namespace: DevExpress.XamarinForms.Editors

Assembly: DevExpress.XamarinForms.Editors.dll

NuGet Package: DevExpress.XamarinForms.Editors

Declaration

public ImageSource ClearIcon { get; set; }

Property Value

Type Description
ImageSource

The icon image.

Remarks

The clear icon appears on the right side of the edit box when a user enters text. Use the ClearIconVisibility property to change the visibility of the clear icon.

Use the ClearIconColor property to specify the icon’s color. To use a custom image for the clear 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 ClearIcon property:

    <dxe:TextEdit ClearIcon = "icon"/>
    

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

Property/Event

Description

ClearIconClicked

Occurs when a user taps the clear icon.

ClearIconCommand

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

ClearIconCommandParameter

Specifies the parameter passed to the ClearIconCommand.

See Also