I have a WPF Listbox filled with children that fire events.
Now, I am dynamically loading each of the children but I want to hook up the events to a handler. Basically, each time one of the children give me a notificationEvent(Notification n), I want to add the Notification (n) to an observable collection.
How would I do this so that no matter the amount of children, I can load all the events into the observable collection.
Also, how would you do this in MVVM?
EDIT: All I want to do is simply add all the Notifications that the children gives me to an observable collection.