avalonia-events
Installation
SKILL.md
Avalonia Routed Events
Overview
Avalonia uses routed events that travel the logical tree. Three strategies:
- Bubble — source → root (default for most input events)
- Tunnel — root → source (
Previewprefix by convention) - Direct — only raised on source element
All input events (PointerPressed, KeyDown, etc.) are routed.
Handling Events
XAML:
<Button Click="Button_Click"/>
<StackPanel PointerPressed="Panel_PointerPressed"/>