Disable F10 from activating a menu window in WPF

I am trying to find a way to prevent the inclusion of F10 in the window menu (the same function as pressing "alt") and running firedowndown / previewkeydown. I know that there are ways to do this using window.forms, but I am using WPF on VB.net, and I cannot find a way to apply it.

+4
source share
1 answer

To achieve this, you must use e.SuppressKeyPress = True in your event handler.

Greetings

Kyle


EDIT: My mistake, sorry.

Ok, then you could make your catch code for your F keys to e.Handled = true, which should clear the WM_Chars queue, which means that the main control will not receive the event. Also, look at the WPF commands to work this way. I do not know a very "clean" solution to this problem. Unfortunately.

+2
source

All Articles