Thursday, November 3, 2016

Routed Event

A routed event is special type of event which can invoke handlers on multiple listeners in an element tree rather than just the object that raised the event.

Routed have three main routing strategies

1.       Direct Event
2.       Bubbling Event
3.       Tunneling Event
Direct event is normal CLR event.
Bubbling event travels up in visual tree hierarchy.
Tunneling event travels down in visual tree hierarchy.

The difference between a bubbling and a tunneling event is that a tunneling event will always start with a preview. Ex.. previewkeydown, previewkeyup. We can create our routed event.

No comments: