I have an ItemsControl bound to an ObservableCollection. When the observable collection changes, I have an event handler that looks at the children of the ItemsControl. Unfortunately, the ItemsControl hasn’t yet added a new item at that time (which is understandable). How can I know when an ItemsControl has finished adding new child controls?
In other words, if I use an ItemsControl to display a list of textboxes, how can I be notified when a new TextBox control has been added to the display?
Well, I ended up digging into the control to find the ContentPresenter. I then attached to the LayoutUpdated event, which counted the children to see if it changed.
It’s kind of a bizarre solution, but it works.