If i have a component derived from ItemsControl
, can I access a collection of it's children so that I can loop through them to perform certain actions? I can't seem to find any easy way at the moment.
A solution similar to Seb's but probably with better performance :
for(int i = 0; i < itemsControl.Items.Count; i++)
{
UIElement uiElement =
(UIElement)itemsControl.ItemContainerGenerator.ContainerFromIndex(i);
}