WPF also supports Attached Routed Events. This is useful while tunneling and bubbling event through elements which don’t define that event. Routed Event can be used as an attached event. Attached events are much similar to Attached Properties. Attached properties use Property value inheritance while Attached events use bubbling and tunneling. Let’s understand Attached Event with simple example.
<Button Content="Click Me!" Height="35" Width="150"
private void StackPanel_Click(object sender, RoutedEventArgs e)
private void Grid_Click(object sender, RoutedEventArgs e)
On Button Click event, it bubbled up the event to top element. StackPanel and Grid doesn’t define their own Click event. So Button.Click (Attached Routed Event) is defined on StackPanel and Grid. So when user clicks on Button, it will call StackPanel_Click first and followed by Grid_Click event.
Related links –