Suggestion Items Customization
SuggestionItem Template
Whenever the default template does not fit a particular scenario you can use the SuggestionItemTemplate property to define a custom template.
- SuggestionItemTemplate (DataTemplate): Defines the template that will be used to create each of the suggestions.
- SuggestionItemTextColor: Defines the Text Color of the suggested item of the component.
Example
Here is an example how to use the RadAutoCompleteView SuggestionItemTemplate:
First, create the needed business objects, for example type Client with the following properties:
Then create a ViewModel with a collection of Client objects:
Finally, use the following snippet to declare a RadAutoCompleteView in XAML:
Where the telerikInput namespace is the following:
Here is the result:
A sample SuggestionItemTemplate example can be found in the AutoCompleteView/Features folder of the SDK Samples Browser application.