Back to Devexpress

EditBase.ClearIconClicked Event

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

latest2.2 KB
Original Source

EditBase.ClearIconClicked Event

Occurs when a user taps the clear icon.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
public event HandledEventHandler ClearIconClicked

Event Data

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

PropertyDescription
HandledGets 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 clear icon (ClearIcon).

You can also use the ClearIconCommand property.

Example

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

xml
<dxe:MultilineEdit ClearIconClicked="MultilineEdit_ClearIconClicked"/>
csharp
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

EditBase Class

EditBase Members

DevExpress.Maui.Editors Namespace