<p>The question says it all basically. </p>

<p>I want in a </p>

<pre><code>class MyClass 
</code></pre>

<p>to listen to a routed event. Can it be done ?</p>

[{'answer_id': 81578, 'author': 'tucuxi', 'author_id': 15472, 'author_profile': 'https://Stackoverflow.com/users/15472', 'pm_score': 0, 'selected': False, 'text': "<p>If you can create an <em>inner</em> class of MyClass (call it MyInnerClass) that derives from FrameworkElement while retaining the capability to access an enclosing MyClass object, your problem will be solved. You can then implement a 'getListener' method within MyClass that returns the embedded MyInnerClass that you will use to actually listen to events.</p>\n"}, {'answer_id': 81590, 'author': 'sirrocco', 'author_id': 5246, 'author_profile': 'https://Stackoverflow.com/users/5246', 'pm_score': 2, 'selected': True, 'text': '<p>Actually I wiredup the event the wrong way :|</p>\n\n<p>I had</p>\n\n<pre><code>EventManager.RegisterClassHandler ( typeof ( MyClass )......\n</code></pre>\n\n<p>Instead of</p>\n\n<pre><code>EventManager.RegisterClassHandler ( typeof ( TheClassThatOwnedTheEvent )\n</code></pre>\n\n<p>So .. my bad.</p>\n'}]
['https://Stackoverflow.com/questions/81280', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5246/']