How to bind the Command property of the ItemTemplate CheckBox to ViewModel object's property?
- by 123Developer
Let me ask this question with a pseudo code:
Where
"Contacts" the ViewModel object set as the DataContext for the window.
"Contacts" has "PersonCollection" , public ICommand PersonSelectedCommand properties.
"PersonCollection" is List
"Person" has Name, Age properties
Currently this is not working as CheckBox is trying to find and bind the ICommand "PersonSelectedCommand" property of object "person", which does not exists!
How will bind the CheckBox to the ICommand "PersonSelectedCommand" property of object "Contact"
Thanks and regards
123Deveopler