开发者

Key binding in wpf

开发者 https://www.devze.com 2023-01-24 17:50 出处:网络
I have 开发者_StackOverflowproblem with key bindings. I can\'t set key for \"+\". Can somebody help me, what should I write in xaml and what should I write in .cs ???Keybindings can be set at the Wind

I have 开发者_StackOverflowproblem with key bindings. I can't set key for "+". Can somebody help me, what should I write in xaml and what should I write in .cs ???


Keybindings can be set at the Window level, so in XAML you'd add...

<Window.InputBindings>
  <KeyBinding Command="YourCommand" Key="+" />
</Window.InputBindings>

I assume you know how to provide a Command with Window.CommandBinding.

0

精彩评论

暂无评论...
验证码 换一张
取 消