In XAML I can do this:
<KeyBinding Command="{Binding UndoCommand}"
Key="Z"
Modifiers="Control"/>
But now I want to implement this in the code behind:
dim binding=New KeyBinding(someCommand,ConvertToKey("Z"), ModifierKeys.Control)
How does the “ConvertToKey” function really look like?
Key is an enum, u can convert string to enum thru
Hope this helps