For example, I have a ItemsControl with a custom DataTemplate:
<ItemsControl Name="CategoriesList">
<ItemsControl.ItemTemplate>
<DataTemplate>
<CheckBox Content="{Binding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
For example my collection contains 100 elements. I want to get which CheckBoxes is checked and which is not or I just want to change a Content property. In both cases I need to get a CheckBox element from code. So it's easy to get Items from code:
var cList = CategoriesList.Items;
foreach (var item in cList)
{
//Do Something
}
But I need to get CheckBoxes from these items. Is it possible?
Thank you!