I have an event in my MainWindow that is being fired from one of my child controls as a routed event. The MainWindow has an AddHandler call to catch the routed fire.
I would like to fire this same event from ANOTHER child element, but this element (a menuItem) gets created on the fly so when I try to use AddHandler in MainWindow, like:
this.AddHandler(MyMenuItem.EditExtensionsEvent, new RoutedEventHandler(this.EditExtensions));
I get a null argument exception because MyMenuItem does not exist yet.
Anyone know of a way that I can still use a routed event?