且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Silverlight TreeView节点DoubleClick事件

更新时间:2023-02-09 16:35:17

您可以通过监视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.