在WPF应用程序级别的快捷键 [英] Application Level shortcut keys in WPF

查看:340
本文介绍了在WPF应用程序级别的快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在WPF应用程序,目前我正在试图绑定命令来启动使用快捷键计算器工具形成应用任何地方,我创建了一个命令,但没有得到如何映射命令和快捷键创建通用的快捷键我的申请。 先谢谢了。

In WPF application I am currently trying to bind a Command to launch a calculator Tool form any where in the application using shortcut keys, I have created a command but not getting how to map commands and shortcut keys to create universal shortcut keys in my application. Thanks in advance.

推荐答案

命令管理要采用集中控制为出发点进行路由所有输入绑定。

The CommandManager wants to use the focused control as the starting point for routing all input bindings.

我已经写了一个行为可以让你轻松全局快捷键绑定使用的RoutedCommand(标准WPF)和的ICommand(MVVM式的)任何控制。

I've written a Behavior that allows you to easily bind global shortcut keys for any control using RoutedCommand (standard WPF) and ICommand (MVVM-style).

WPF行为:全球应用程序快捷键

这篇关于在WPF应用程序级别的快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆