My ItemControl is binded via ItemsSource to an ObservableCollection<...>. When I fill the collection, the program needs some (a little, but still some) time to create right ItemTemplate objects and render them in my ItemsControl. Is there any way to get known, if my ItemsControl has ended creating (rendering, displaying) the collection binded through the ItemsSource? Please, help. I really need this answer. Just after filling the ObservableCollection I want to work on the objects of this collection. Unfortunatly, some of the informations is being lost, cuz ItemsControl is still creating it's items (ItemTemplates).
*EDIT To be better understood: ObservableCollection<...> MyCollection is binded to ItemsSource of MyItemsControl.
I run the code:
for(int i = 0; i < ...; i++)
{
MyCollection.Add(MyItem);
}
// await Task.Delay(100) // If this line is not commented, everything works fine...
// ..but I don't think it's a good idea to solve that problem in this way.
foreach(Object o in MyCollection)
{
// The line under, is faster that the ItemsControl rendering...
// ...so the Work is not displayed.
o.DoSomeWorkThatShouldBeDisplayedInItemTemplateOfMyItemsControl
}
*EDIT 2 Solved: LayoutUpdated event