本文介绍了WPF KeyBinding Key 可以有几个替代值吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 KeyBinding
,其中 Key
设置为 ,即 1
键.这与 键不同.
I have a KeyBinding
with the Key
set to which is the 1
key. This isn't the same as key.
有没有办法拥有类似的东西:
Is there a way to have something like:
Key="D1 && NumPad1"
所以按下 或 会执行命令?
So that pressing either or would execute the command?
我为每个键 D1 & 添加了第二个 KeyBindingNumPad1,但似乎应该有更好的方法.
I've added a second KeyBinding one for each key D1 & NumPad1, but that seems like there should be a better way.
推荐答案
不,你不能那样做.
这篇关于WPF KeyBinding Key 可以有几个替代值吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!