Search code examples
xamarinxamarin.formsxamarin.iossearchbar

How to change "Search" button text in keyboard of SearchBar in Xamarin Forms?


I use following code for SearchBar control. When user click on SearchBar, it shows keyboard with "Search" button to search in Keyboard. I want to change name of it.

Here is my current code: Xaml

<SearchBar Text="{Binding SearchText}" Placeholder="Search" />

SS enter image description here


Solution

  • There is a NuGet package called EntryCustomReturnPlugin. It allows you to change the text on the done button of an Entry.

    However I don't think it works with a SearchBar out of the box. You will need to either change your SearchBar into an Entry or write a custom renderer (you can use the source code of the EntryCustomReturnPlugin, the code will be very similar to that).