In this article
Not finding the help you need?
The SearchBar
module represents a UI component
similar to UISearchBar
in iOS and
android.widget.SearchView
for Android, both of
which allow you to to create a simple filter for the the content
in the app. This component provides hint
and
text
properties and submit
and
clear
events.
Using SearchBar
component with
hint
and text
with Angular binding.
The user input can be handled by using the submit
,
textChange
and clear
events.
< StackLayout>
< SearchBar hint = " Search" color = " yellow" backgroundColor = " red" textFieldHintColor = " whitesmoke" textFieldBackgroundColor = " orangered" />
</ StackLayout>
In the following example is shown, how to create SearchBar via
Code-behind
Name
Type
Description
hint
string
Gets or sets the text of the search bar text field
hint/placeholder.
text
string
Gets or sets a search bar text.
textFieldBackgroundColor
Color
Gets or sets the TextField background color of the
SearchBar component.
textFieldHintColor
Color
Gets or sets the TextField Hint color of the SearchBar
component.
Name
Description
clear
Emitted when the search is cleared (via the clear button).
submit
Emitted when the serach term is submitted.