tags:

views:

69

answers:

2

I can't find the event that would get fired when a child is added or removed from a WPF panel. Does such an event exist and I am just missing it?

+2  A: 

I couldn't find an event, but you might try the Panel.OnVisualChildrenChanged method.

Robert Macnee
A: 

Alternatively, you could wrap your panel in a UserControl (perhaps called ObservablePanel?), which has an AddChild method that fires an event after adding the item to the panel.

Mike Pateras