TextEditBase.ClearIconClicked Event

Occurs when a user taps the clear icon.

Namespace: DevExpress.XamarinForms.Editors

Assembly: DevExpress.XamarinForms.Editors.dll

Declaration

public event HandledEventHandler ClearIconClicked

Event Data

The ClearIconClicked event's data class is HandledEventArgs. The following properties provide information specific to this event:

Property Description
Handled Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.

Remarks

Handle the ClearIconClicked event to set an action that occurs when a user taps the ClearIcon.

You can also use the ClearIconCommand property.

Examples

This example shows how to use the ClearIconClicked event to confirm the clear operation.

<dxe:MultilineEdit ClearIconClicked="MultilineEdit_ClearIconClicked"/>
async private void MultilineEdit_ClearIconClicked(object sender, HandledEventArgs e) {
    e.Handled = true;

    if (await DisplayAlert("Warning!",
                           "You are about to delete the text you entered. Do you want to proceed?",
                           "Ok", 
                           "Keep the text")) { 
        e.Handled = false; 
        Multiline.Text = ""; 
    }
}
See Also