When I try to get the eventinfo of a WPF 'rectangle', if the routedEvent is a native event to the object (e.g. 'MouseDown') it works (assignments are for example only).
DependencyObject d = rectangle;
string routedEvent = "MouseDown";
EventInfo eventInfo = d.GetType().GetEvent(routedEvent,
BindingFlags.Public | BindingFlags.Instance);
But when I want to get the EventInfo for an attached event (I think I am using that term correctly) on the rectangle like:
string routedEvent = "Microsoft.Surface.Presentation.Contacts.ContactDownEvent";
GetEvent() returns null
Any idea on how to get the eventinfo for an attached event.
Thanks
Dan