Hello, I am trying to avoid that the user can copy, paste, cut and print from my application with WPF.
What I found in the forum all used in the System.Windows.Forms.KeyEventArgs
method however I have to use System.Windows.Input.KeyEventArgs
because I'm in the UIElement class then the KeyDown method asks for the input then all the code I've seen does not it works since this library does not have e.Control
.
The problem is that I believe that this liberia only takes a key not both of them and this does not work either:
(Keyboard.Modifiers == ModifierKeys.Control && e.Key == Key.P)