Searching
ComboBox provides both case-sensitive and case-insensitive searching modes. The following properties are exposed:
-
SearchMode (enumeration of type Telerik.XamarinForms.Input.SearchMode): Defines the value that sets search sets some search criteria for the control. The available options are:
Contains
,StartsWith
,ContainsCaseSensitive
andStartsWithCaseSensitive
. The default SearchMode isStartsWith
. - SearchTexhPath(string): Specifies the name of the property against which the searching will be performed.
- HighlightTextColor (Xamarin.Forms.Color): Defines the color of the text that will be highlighted when searching is performed.
Searching can be performed when
IsEditable
is set totrue
.
Example
Here is the ComboBox definition in XAML:
When binding to a complex objects, ComboBox
DisplayMemberPath
property should be set. When you want to achieve Searching setIsEditable
totrue
andSearchTextPath
.
In addition to this, you need to add the following namespace:
the sample business model
and the ViewModel used:
Here is how the control looks when searching is performed:
The SearchingMode example can be found in our SDK Browser Application. You can find the applications in the Examples folder of your local Telerik UI for Xamarin installation or in the following GitHub repo.