如何将WPF中的命令绑定到控件的双击事件处理程序

如何将WPF中的命令绑定到控件的双击事件处理程序

本文介绍了如何将WPF中的命令绑定到控件的双击事件处理程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我需要绑定一个文本块(或潜在的图像,以任何一种方式,它的用户控件)的双击事件到我的ViewModel中的命令。I need to bind the double click event of a textblock (or potentially an image as well - either way, its a user control), to a command in my ViewModel. TextBlock.InputBindings似乎未正确地绑定到我的命令,任何帮助?TextBlock.InputBindings does not seem to bind correctly to my commands, any help?推荐答案尝试Marlon Grech的附加的命令行为。Try Marlon Grech's attached command behaviors. 这篇关于如何将WPF中的命令绑定到控件的双击事件处理程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-20 22:23