Silverlight TreeView节点DoubleClick事件 [英] Silverlight TreeView Node DoubleClick Event

查看:105
本文介绍了Silverlight TreeView节点DoubleClick事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我有SilverLight TreeView控件,当我双击Silverlight Treeview节点时,我需要执行一些任务.因此,我该如何为Treeview控制节点编写双击事件.有人可以帮我这个忙吗?...(我们有wpf树视图的doubleclick事件,但在Silverlight树视图中没有).


预先感谢....

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....

推荐答案

您可以通过监视mouseup事件中的单击并随后启动计时器以确保第二次单击来模拟双击
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.



我不知道确切的答案,我从未使用silverlight.我认为MouseDown事件的eventargs中有一个ClickCount属性.只需检查一下即可.

谢谢,
Vineeth
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


我在尝试向GridViewRow中添加双击时找到了这篇文章.使用GridView可以正常工作,我认为对TreeView可能有用.
http://blog.jtango.net/2008/11 /02/处理在Silverlight中的gridrow中的doubleclick/
您所需要的就是MouseClickManager.

我建议您为每个TreeViewItem的MouseLeftButtonUp添加处理程序.
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.


这篇关于Silverlight TreeView节点DoubleClick事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆