DelegateCommand vs RoutedCommand and gestures - WPF

我们两清 提交于 2020-01-02 09:56:32

问题


is there anyway for DelegateCommand's to support gestures when building a composite WPF app? I'm trying to create a command used by a MenuItem and also a Button, which can be accessed through a keyboard shortcut, but which sits inside a class in a separate assembly.

I can use a RoutedCommand, but I want to minimise any code-behind.


回答1:


Use InputBindingCollection to map gestures with ICommand.



来源:https://stackoverflow.com/questions/2297321/delegatecommand-vs-routedcommand-and-gestures-wpf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!