Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 332013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:49:40+00:00 2026-05-12T09:49:40+00:00

I need a simple example of a Tunnel Routed Event tunnelling from a parent

  • 0

I need a simple example of a Tunnel Routed Event tunnelling from a parent control to a child control.

(THIS IS NOT REAL CODE) — in fact, the deeper I go, the more I think that the XAML is wrong — probably should NOT sign up for the tunnelled event in XAML on the child node (not sure?)

<PARENT>    
   <MyControl DoSomethingOnUserAction="raiseTunnelEvent"> HELP </MyControl >    
   <CHILD> I SHOULD HANDLE tunnelled event </CHILD> 
</PARENT>

Simple, concise example would be helpful.

Thanks,
Alan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T09:49:40+00:00Added an answer on May 12, 2026 at 9:49 am

    Not sure, but you may be wanting a cat to bark.

    The RoutedEvent ClickEvent of Button (from PresentationFramework) is declared as:

    public static readonly RoutedEvent ClickEvent = 
        EventManager.RegisterRoutedEvent("Click", 
        RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof
        (ButtonBase));
    

    Note the readonly RoutingStrategy of Bubble.

    The following may help with understanding Tunnel, Bubble, and Direct:
    msdn.microsoft.com/en-us/library/system.windows.routingstrategy.aspx

    And this should take you the rest of the way:
    msdn.microsoft.com/en-us/magazine/cc785480.aspx

    A tip: by convention tunneling events in WPF begin with “Preview” (e.g.- “PreviewExplode”. If the event doesn’t begin with “Preview” it probably doesn’t use the tunnel RoutingStrategy. Also you will usually see a Tunnel and Bubble paired with the Tunnel firing first then the Bubble as in “PreviewExplode” followed by “Explode”.

    If you need to have a Button’s Click tunnel, you might consider

    1. using PreviewMouseDown (not the same of course and likely dangerous since not all mouse-downs are meant to become clicks).
    2. Writing a TunnelButton that raises a PreviewClick and then a Click.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need simple code to do something like this. For example my old site
need a simple example of how to call ApplicationPinServices BeginVerifyPin and EndVerifyPin methods from
In this simple example, why do I need to make 'member' const in order
I need a simple proxy PHP function/script that can download a file from a
I need a simple example where we POST some HTTP request to the server.
Please show me simple example why do we need it and what will happen
I need your help. I have made a really clean and simple example to
I need simple example for calculate PCB bit for APDU command. For example I
I need a very simple example to understand myself about the events.I am feeling
As a simple example, let's say you have this matrix: M = [omega 1;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.