I have the following (very simple) ItemsControl:
<ItemsControl Name="BlahList" ItemsSource="{Binding Blah}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Name="MyCheckBox" Content="{Binding Text}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
In code, I would like to do the following:
foreach (var dahCurrentItem in BlahList.Items)
{
var ItemCheckBox = BlahList.GimmeMyControl(dahCurrentItem, "MyCheckBox")
// I'm going to do something with the check box here...
}
How do I do that?