I have a list of States in an ItemsControl, the DataTemplate is a CheckBox. I would like to add a function to select(check) all states. However I need to loop through the CheckBoxs rather then the data items since the checked state is stored in a separate data structure then the list of states the ItemsControl's ItemSource is bound to.
+1
A:
Have a property in your DataObject called IsChecked and bind that to the Checkbox in DataTemplate(Default is TwoWay)
Jobi Joy
2008-10-10 07:25:06
ItemContainnerGenerater is not a member of ItemsControl in Silverlight.
Aaron Fischer
2008-10-10 13:48:35
Oops sorry I didnt notice the Silverlight :)
Jobi Joy
2008-10-11 07:30:05
A:
In the data template I subscribed to the checkbox's onload event. And in the event handler I add the checkbox reference to a generic list of checkbox.
Aaron Fischer
2008-10-18 16:23:57