I have a treeview, where in I am using stackpanel to bind a checkbox to the treeviewitems. I am doing it like this:
TreeViewItem tvi =newTreeViewItem();
tvi.Header= createStackPanel();
tvi.Tag=<stringas tag>;
tvi.Items.Add(dummyNode);
myTreeview.Items.Add(tvi);
createStackPanel function is implemented like this:
privateStackPanel createStackPanel(){StackPanel pan =newStackPanel();CheckBox cb =newCheckBox();
pan.Orientation=Orientation.Horizontal;
pan.Children.Add(cb);return pan;}
My question is, now that I have checkboxes on my treeviewitems, how will I get the check values of each checkbox? Or how will I keep track of which checkboxes are checked?
Thanks in advance!