How to bind the Command property of the ItemTemplate CheckBox to ViewModel object's property?

Posted by 123Developer on Stack Overflow See other posts from Stack Overflow or by 123Developer
Published on 2010-06-17T04:27:52Z Indexed on 2010/06/17 4:33 UTC
Read the original article Hit count: 255

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about wpf

Related posts about binding