Suggestion Items Customization
Whenever the default template does not fit a particular scenario you can use the SuggestionItemTemplate
.
-
SuggestionItemTemplate
(DataTemplate
)—Defines the template that will be used to create each of the suggestions.
Example
Here is an example how to use the RadAutoComplete SuggestionItemTemplate
:
1. Create the needed business objects, for example type City with the following properties:
2. Create a ViewModel with a collection of City objects:
3. The following snippet shows the SuggestionItemTemplate
:
Here is the result:
For AutoComplete SuggestionItemTemplate example refer to the SDKBrowser Demo application.