c# - Possible to check if Key V is pressed in AddingNewItem event in WPF Datagrid -
Is it possible to check whether the key is pressed into the AddingNewItem event in the VWP Datagroup, such as how to preview the Kidadown event Is done
Private zeros grd_PreviewKeyDown (Object Sender, KeyEventArgs e) {if (e.Key == Key.V & amp; (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) {// TODO}} I see if Ctrl + V is pressed, is it possible to do the same check in the event by adding?
You can use Keyboard.IsKeyDown () in this way: if (((Keyboard. ISKDown (key.LIFTLL) || keyboard .iskdown (key. Right-CTRL) and keyboards. ISKDown (key.W)) {// CTRL + V is pressed}
Comments
Post a Comment