I have a DataBound (via HierachicTemplates) WPF TreeView that works fine with the mouse, but I want it to be able to control it using the keyboard. I added CommandBindings so that ContextMenu elements can be executed using gestures; for example CTRL + Delete to delete the currently selected item, but I want the Properties key to display a context menu and so that the user can use the cursor keys to navigate it.
I created a CommandBinding and debugged it, but RoutedUIEvent has ContextMenu. I tried to create it from Xmal Resources and it worked, but this is clearly wrong, since everything is disabled.
How to create WPF ContextMenu with which I can navigate from the keyboard?
source
share