Collections
Binding Context can change implicitly in controls like Repeater
. We'll illustrate that by making a To-Do list.
Tasks
- Add a property of type
List<ToDoItem>
calledItems
to the ViewModel and initialize it.
Note: A ViewModel can contain any concrete collection type like
List
,HashSet
, andDictionary
. Using collection interfaces likeIEnumerable
,IList
, andIDictionary
is not recommended.
Message | Line | Column | |
---|---|---|---|