[英]Shortcuts Ctrl+C Ctrl+V dont work in Textboxes if MenuStrip has this Shortcuts set
[英]KeyBinding for gestures CTRL+C and CTRL+ V do not work?
我的视图模型中有一些 ICommand,我想使用键盘绑定将它们绑定到我的用户控件。 我面临的问题是,当我使用CTRL + C和CTRL + V将我的复制和粘贴命令绑定到我的 UserControl 时,它们不会被触发。 我应该覆盖它们还是什么?
<UserControl.InputBindings>
<KeyBinding Gesture="CTRL+C" Command="{Binding CopyCommand}" />
</UserControl.InputBindings>
这对我来说就像一个魅力:
<!--COPY-->
<UserControl.InputBindings>
<KeyBinding Key="C" Modifiers="Ctrl" Command="{Binding CopyToStackCommand}" />
</UserControl.InputBindings>
<!--PASTE-->
<UserControl.InputBindings>
<KeyBinding Key="V" Modifiers="Ctrl" Command="{Binding PasteFromStackCommand}" />
</UserControl.InputBindings>
<KeyBinding Key="C" Modifiers="Ctrl" Command="Copy" CommandParameter="{Binding copy}" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.