Click here to Skip to main content
16,015,755 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I have SilverLight TreeView Control and I need to perform some task when i double click on Silverlight Treeview Node. So how can i write the double click event for treeview control node. Can anybody help me regarding this.... (We have doubleclick event for wpf treeview but not in silverlight tree view).


Thanks in advance....
Posted

You could simulate a double click by monitoring a click in the mouseup event and then starting a timer to ensure that a second click happens within a given period.
 
Share this answer
 
Hi,
I dont know exactly the answer , i never used silverlight.I think there is a property ClickCount in the eventargs of MouseDown event.Just check it out.

Thanks,
Vineeth
 
Share this answer
 
v2
I found this article while trying to add doubleclick to GridViewRow. With GridView works fine and i think might be usefull to TreeView.
http://blog.jtango.net/2008/11/02/handling-a-doubleclick-on-gridrow-in-silverlight/
All you need from there is MouseClickManager.

I soopose you will need to add handler to MouseLeftButtonUp for each TreeViewItem.
 
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