Search bar cancel button text is not displaying MAUI windows app

Amose Kumar R 5 Reputation points
2024-10-11T10:00:48.6566667+00:00

Search bar cancel button text is not displaying MAUI windows app
SearchBar _searchBar = new SearchBar()

    {

        HeightRequest = 42,

        VerticalOptions = LayoutOptions.Start,

        HorizontalOptions = LayoutOptions.End, 

        WidthRequest = 250

    };  

I have the above code to display a search bar, it is display like below
User's image

But i need a cancel button to close the search bar, is is possible to display a cancel button in windows?

Thanks

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,517 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,613 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.