Try this to get all events from the Button type ... You can replace another type.
RoutedEvent[] events = EventManager.GetRoutedEventsForOwner(typeof(Button));
foreach (RoutedEvent e in events)
elem.AddHandler(e, handler);
You can also substitute the following to get ALL routable events for ALL types, but this will be a pretty list!
RoutedEvent[] events = EventManager.GetRoutedEvents();
source
share