views:

172

answers:

2

Is there any way to register a global event handler for catching mouse events in a Silverlight application? I'd like to avoid subscribing to the mouse event handlers of each FrameworkElement and find a more elegant solution (bubbled events). Thanks

A: 

MouseMove is a bubbling event in Silverlight; have you tried to catch it at the level of the Window ?

Timores
A: 

All the Mouse events are bubbling events so on the surface of it you should be able to attach event handlers to a root UserControl or Page element and get the events.

However many of the controls have use for the mouse events and handle these events themselves. In those cases those events do not bubble any futher.

AnthonyWJones