开发者

Need help creating Hotkeys for WPF controls hosted in a Word application ADDIN

开发者 https://www.devze.com 2023-04-05 22:33 出处:网络
I created a word application addin which will host couple of WPF controls. I have to define some hotkeys for wpf buttons.

I created a word application addin which will host couple of WPF controls.

I have to define some hotkeys for wpf buttons. So I went ahead and created the same and added them to the inputbindings of respective wpf controls. The hot keys work fine if the focus is on the controls. however , if the users are typing into word and then try to press the hotkeys nothing happens and I guess word eats away the commands.

I could probabl开发者_开发知识库y create a lowlevel keyboard hook and filter it out , but since the app is keyboard intensive I prefer not to use this approach.

Can anyone suggest me any other alternative? Thanks in advance.


I could not find an answer to this. So I created my custom ribbon in word and added all the required buttons to ribbon to overcome this hurdle.The buttons in window can have shortcut keys.

0

精彩评论

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