Repeater
The Repeater control renders a collection of items from its DataSource property using a template:
<dot:Repeater DataSource="{value: Items}">
<p>{{value: Text}}</p>
</dot:Repeater>
A <p> element will be rendered for every item in the Items collection. Inside the Repeater, the Binding Context changes to the item object itself.
Tasks
Let's display the To-Do items.
- Inside the
<body>element, add aRepeaterwithDataSourcebound toItems. - Display a
<p>element for every item in theItemscollection. - Bind the paragraph content to the
Textproperty.
| Message | Line | Column | |
|---|---|---|---|
|
|