R – How to listen to a RoutedEvent from a class that doesn’t derive from FrameworkElement ? Can it be done

routed-eventswpf

The question says it all basically.

I want in a

class MyClass 

to listen to a routed event. Can it be done ?

Best Solution

Actually I wiredup the event the wrong way :|

I had

EventManager.RegisterClassHandler ( typeof ( MyClass )......

Instead of

EventManager.RegisterClassHandler ( typeof ( TheClassThatOwnedTheEvent )

So .. my bad.

Related Question