title: How to bind the Command property of the ItemTemplate CheckBox to ViewModel object's property?
body: <p>Let me ask this question with a pseudo code:
  <Pre><Code></p>
  
  &lt;Window&gt;
      &lt;ListView ItemsSource="{Binding PersonCollection}"&gt;
          &lt;ListView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel&gt;
                      &lt;TextBlock Text="{Binding Path=Name}" /&gt;
                      &lt;TextBlock Text="{Binding Path=Age}" /&gt;
                      &lt;TextBlock Text="/" /&gt;
                      &lt;CheckBox Command="{Binding PersonSelectedCommand}" /&gt;  &lt;!-- Where "PersonSelectedCommand" is a public command property available in ViewModel object (lets say "Contacts"  in this context)--&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListView.ItemTemplate&gt;
      &lt;/ListView&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>
  Where <br/>
      "Contacts" the ViewModel object set as the DataContext for the window.<br/><br/>
      "Contacts" has "PersonCollection" , public ICommand PersonSelectedCommand properties.
      "PersonCollection" is List <br/><br/>
      "Person" has Name, Age properties<br/><br/></p>
  
  <p>Currently this is not working as CheckBox is trying to find and bind the ICommand "PersonSelectedCommand" property of object "person", which does not exists!</p>
  
  <p>How will bind the CheckBox to the ICommand "PersonSelectedCommand" property of object "Contact"</p>
  
  <p>Thanks and regards<br/>
  123Deveopler</p>