Avalonia
HomeSupportGitHub Repository
Search…
πŸ‘‹
Welcome
Documentation
⚑
Getting Started
πŸ”„
Data Binding
🎨
Styling
🧰
Controls
πŸ“š
Templates
✏
Authoring Controls
πŸ–±
Input
πŸ”‘
Animations
πŸ“
Layout
πŸ“¦
Distribution / Publishing
API Reference
🧾
Namespaces
Guides
🐣
Basics
🀿
Deep dives
πŸ‘©πŸ’»
πŸ‘©πŸ’» Developer Guides
Tutorials
πŸ“‹
ToDo List App
πŸ“»
Music Store App
Running in the Browser
πŸ“±
Developing for Mobile
Misc
πŸ‘ͺ
Community
πŸ–₯
WPF Developers Tips
Styling
DataTemplates
HierachicalDataTemplate
UIElement, FrameworkElement and Control
DependencyProperty
Grid
ItemsControl
Tunnelling Events
Class Handlers
PropertyChangedCallback
RenderTransforms and RenderTransformOrigin
πŸ“‹
Projects that are using Avalonia
❔
FAQ
Powered By GitBook
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:
1
target.AddHandler(InputElement.KeyDownEvent, OnPreviewKeyDown, RoutingStrategies.Tunnel);
2
​
3
void OnPreviewKeyDown(object sender, KeyEventArgs e)
4
{
5
// Handler code
6
}
Copied!
Previous
ItemsControl
Next
Class Handlers
Last modified 1yr ago
Export as PDF
Copy link
Edit on GitHub