Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am new to Wpf and I have problem with the Tunneling and Bubbling technique. I have a grid with a textblock inside it. The textblock inherits the routed mouse events for the grid. And i have my own double click event implemented for the grid. My problem is when i have my double click event triggered in a application using my grid, the double click event triggers twice if i double click on the TextBlock, if i click else where it triggers once. How can i stop it from triggering twice. Any help is appreciated.

Thanks,
Mike.
Posted

1 solution

In order to mark a RoutedEvent as handled, you can set the Handled property of the RoutedEventArgs class.


You can see an example and more explanation in the MSDN topic about the RoutedEventArgs.Handled property.

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900