Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 398 Bytes

tunnelling-events.md

File metadata and controls

13 lines (9 loc) · 398 Bytes

Tunnelling Events

Avalonia has tunnelling events but they're not exposed via separate Preview CLR event handlers. To subscribe to a tunnelling event you must call AddHandler with RoutingStrategies.Tunnel:

target.AddHandler(InputElement.KeyDownEvent, OnPreviewKeyDown, RoutingStrategies.Tunnel);

void OnPreviewKeyDown(object sender, KeyEventArgs e)
{
    // Handler code
}