SearchBar2

RedCorners.Forms.SearchBar2 is an extended version of SearchBar with a few iOS-specific features and a bindable property that lets the view model know immediately when its text is changed.

Properties

Action<string> TextChangeAction

This bindable property lets the view model know immediately when the text in the SearchBar has changed, without a need to submit the text. This is useful in building auto-complete experiences. For example:

<rf:SearchBar2 TextChangeAction="{Binding TextChangeAction}" />
// View Model
public Action<string> TextChangeAction => query => 
    Console.WriteLine(query);

iOS-Specifics

ICommand CancelCommand, object CancelCommandParameter

This Command is executed when the user taps on the Cancel button on the iOS SearchBar.

bool IsCancelVisible

This property toggles the visibility of the Cancel button on the iOS SearchBar.