Skip to content

How is a routed event executed? #18589

Answered by stevemonaco
alvahtin asked this question in Q&A
Discussion options

You must be logged in to vote

You should use DevTools to trace events instead: https://docs.avaloniaui.net/docs/guides/implementation-guides/developer-tools#events

For the bubbling case, you don't get the event because the Button handles the event as part of its Click interaction implementation. This means that all controls above the Button in the visual tree will not receive the event unless you specify handledEventsToo in the AddHandler registration.

For the direct calls, I believe this is because the PointerPressedEvent is registered only to tunnel and bubble. I don't really use Direct events much. See:

/// <summary>
/// D…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by alvahtin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants