Clear button in the entry is not clearing the text

Srilekha Chowdary 60 Reputation points
2024-07-03T09:49:22.7766667+00:00

Hi,

I am using an entry to take user input. I am showing the clear button using the WhileEditing value for ClearButtonVisibility but clicking on the button does not perform any action. It does not clear the text in the entry. Also there is no command exposed for clear. Is there a way to clear the text in entry by clicking the clear button?

<Entry
    Margin="10,0,0,0"
    ClearButtonVisibility="WhileEditing"
    FontSize="14"
    HeightRequest="35"
    HorizontalOptions="FillAndExpand"
    Text="{Binding SearchSiteText}"
    VerticalOptions="FillAndExpand"/>

Affected Platform - Android Version used - .Net 8

I have removed the binding text and used a simple entry but it's still not working

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,153 questions
{count} votes