DelegateCommand 与 RoutedCommand 和手势 - WPF

发布于 2024-08-22 08:44:33 字数 152 浏览 1 评论 0原文

在构建复合 WPF 应用程序时,DelegateCommand 是否支持手势?我正在尝试创建一个由 MenuItem 和 Button 使用的命令,可以通过键盘快捷键访问该命令,但它位于单独程序集中的类内。

我可以使用 RoutedCommand,但我想最小化任何隐藏代码。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

盗心人 2024-08-29 08:44:33

使用 InputBindingCollection 通过 ICommand 映射手势。

Use InputBindingCollection to map gestures with ICommand.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文