0
votes

Using C#, .NET 4, WPF.

I have a Telerik rich text control that is losing certain key events (tab, backspace, delete, and the arrow keys are specifics).

For debugging purposes I have added handlers for PreviewKeyDown, KeyDown, CommandExecuting, and DocumentContentChanged. The behavior presents both with and without the handlers present, in both DEBUG and RELEASE mode.

If I press a key other than those listed above I get the events in the order listed above. As an example, if I press the 'a' key I get PreviewKeyDown, KeyDown, CommandExecuting, and DocumentContentChanged.

If I press the right arrow key I get PreviewKeyDown and no other of the events fire.

My suspicion is that there is something trapping the KeyDown event at some point in the message chain before it gets to me and setting e.Handled = true.

Is there any tool available that would allow me to detect the KeyDown event and see in what code it's e.Handled is modified? I know I'm stretching here...

Thanks!

rjsjr

1

1 Answers

1
votes

You could use Snoop. It can tell you, which Element set handled = true. If you need to process these events, you can use EventManager.RegisterClassHandler().