The delegate is a callback function. It will be called at the moment when it is necessary to perform any action. For example, in a Selector control, a delegate will be called when a piece of text is entered to get a list of choices.
The object describing the delegates in the template is a regular JavaScript object. The property names of this object are the names of the delegates, and the values are functions.
Delegates in views are set using the Delegate
property of the corresponding control.
this
- root object (TRoot)....
- the rest of the arguments depend on the specific delegate.
XAML:
Javascript: