Routed events are events which navigate up or down the visual tree acording to their
RoutingStrategy
. The routing strategy can be bubble, tunnel or direct. You can hook up event handlers on the element that raises the event or also on other elements above or below it by using the attached event syntax: Button.Click="Button_Click"
.
Routed events normally appear as pair. The first is a tunneling event called
PreviewMouseDown
and the second is the bubbling called MouseDown
. They don't stop routing if the reach an event handler. To stop routing then you have to sete.Handled = true;
Preview...
and appears before corresponding bubbling event.
No comments:
Post a Comment