Is there a way to pass a parameter to a command through a keybinding done in code?
Posted
by highone
on Stack Overflow
See other posts from Stack Overflow
or by highone
Published on 2010-04-14T02:11:25Z
Indexed on
2010/04/14
2:13 UTC
Read the original article
Hit count: 395
I am making a custom control I need to add some default keybindings, microsoft has already done with copy and paste in a textbox. However one of the keybindings needs to pass a parameter to the command which it is bound to. Is there any way to do this in code?
this.InputBindings.Add(new KeyBinding(ChangeToRepositoryCommand, new KeyGesture(Key.F1)));
© Stack Overflow or respective owner