Hello everyone,
I need to remove (or at least change) the default gestures associated with the wpf standard commands.
Here's my problem :
I have a Datagrid (XamDataGrid from infragistics) to which i have associated a custom command I've created. That command uses the "ctrl-delete" gesture.
That works as long as I'm not editing the value of a cell.
When I'm editing a Cell, a TextEditor is used. When I use the "ctrl-delete" gesture, instead of executing my command, the DeleteNextWord command is executed.
That's normal, the TextEditor has focus, and as there are no bindings or inputgestures attached, the class ones are used.
That's where lies my problem. I cannot (without being overkill) add a binding or input gesture to that instance of TextEditor.
So the method I'm trying to use is to either remove or modify the "default" key gesture of the DeleteNextWord command.
After looking around with .Net Reflector to understand how the commands were registered, I saw that the framework gets the key associated to the command from a resource.
In my case, the gesture "ctrl-delete" comes from the key "KeyDeleteNextWord" in the resource "ExceptionStringTable" (internal type SR, static constructor).
So my question :
Hoe can I overwrite the value of "KeyDeleteNextWord" in the resource "ExceptionStringTable" ?
or, in a more general way :
How can I globally modify the default gesture of a standard WPF command ?
I would gladly provide more information if needed.
Thank you.