I have a list box with its itemtemplate set to contain checkboxes. How do I retrieve the checkboxes through an event after having set the itemsource on the listbox.
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
(sender as ListBox).Items ----- this is the itemssource
How do I get the check box object?????
}
Thanks in advance.
Person.
Martin CookPosted Feb 10, 2010, 7:40 AM
Would definitely be worth swatting up on WPF Databinding: -
http://msdn.microsoft.com/en-us/library/aa480224.aspx
Cheers,
Martin
Piotr JustynaPosted Dec 9, 2009, 11:22 AM
Why do you want to retrieve children collection from "sender" object, since you already have it in the code? "People" property is already bound to your listbox :)