Click here to Skip to main content
15,891,845 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm making a WPF application for drawing graph and generating xml for dat graph.
I have a list of blocks in a toolbox. these blocks are dragged into a canvas at runtime. when I right click on a dragged block, I need to open a new window depending on the block clicked. fr dat, hw can I know whic block is clicked..

thanks in advance..
Posted
Updated 9-Jan-12 20:04pm
v2

If you can understand Routed Events, then will able to figure out the exact control the click is coming from - go through this[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 10-Jan-12 3:03am    
Makes sense, a 5.
--SA
Abhinav S 10-Jan-12 3:12am    
Thank you SA.
This is a wrong approach. Instead, you should directly handle a click on the element you want to handle and ignore others.

The question is just the result of anti-OOP and anti-event-oriented thinking, which should be fixed.

—SA
 
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