WPF:双击路径事件

Car*_*rri 1 c# wpf canvas path

我有几个嵌套在画布中的路径.我希望每个路径在用户双击路径时显示MessageBox.我知道路径类没有MouseDoubleClick事件,但是canvas类可能会有帮助.

如何为Path创建MouseDoubleClick事件?

Tho*_* Li 5

Path班有MouseDown活动.您可以使用该ClickCount属性检测点击次数MouseButtonEventArgs.

有关详细信息,请查看http://www.switchonthecode.com/tutorials/wpf-tutorial-getting-the-doubleclick-event.