c# - Possible to check if Key V is pressed in AddingNewItem event in WPF Datagrid -
is possible check if key v pressed in addingnewitem event in wpf datagrid similar how done in previewkeydown event
private void grd_previewkeydown(object sender, keyeventargs e) { if (e.key == key.v && (keyboard.modifiers & modifierkeys.control) == modifierkeys.control) { //todo } }
i checking if ctrl+v pressed, possible same check in addingnewitem event?
you can utilize keyboard.iskeydown()
this:
if (((keyboard.iskeydown(key.leftctrl) || keyboard.iskeydown(key.rightctrl)) && keyboard.iskeydown(key.v))) { // ctrl + v pressed }
c# wpf xaml datagrid
No comments:
Post a Comment