What would be some sample code that will trap the Ctrl+Tab and Ctrl+Shift+Tab for a WPF application?
We have created KeyDown
events and also tried adding command bindings with input gestures, but we were never able to trap these two shortcuts.
What would be some sample code that will trap the Ctrl+Tab and Ctrl+Shift+Tab for a WPF application?
We have created KeyDown
events and also tried adding command bindings with input gestures, but we were never able to trap these two shortcuts.
Gustavo's answer was exactly what I was looking for. We want to validate input keys, but still allow pasting:
You have to use
KeyUp
event, notKeyDown
...Working version of Szymon Rozga answer (sorry, I can't comment). We don't look on Alt, but it's accounting can be simply added at first if
What KeyDown handler did you have? The code below works for me. The one that gives me trouble is: Alt + Tab, but you didn't ask for that :D
Hi you can use this on keydown event