Token Customization
Token Template
RadAutoCompleteView provides an option to customize the template that vizualize the tokens through TokenTemplate property.
- TokenTemplate (DataTemplate): Defines the template used to vizualize the tokens.
Example
Here is an example how to use the RadAutoCompleteView TokenTemplate:
First, create the needed business objects, for example type City with the following properties:
Then create a ViewModel with a collection of City objects:
let's use the following snippet to declare a RadAutoCompleteView and its TokenTemplate with RadDataGrid in XAML:
and the code for Label.GestureRecognizer property:
Here is the result:
A sample Tokens Template example can be found in the AutoCompleteView/Templates folder of the SDK Samples Browser application.