Pressing arrow keys doesnt trigger the KeyDown event in a text box

Hi,

I have a custom text box and I want to implement custom navigation for it. When the user presses arrow keys (Left, Right, Up, Down) or Tab key or Enter key, I want to capture the key down event and select another control in the window. But pressing arrow keys does'nt trigger the KeyDown event when the cursor is inside the textbox. How can I achieve that

Thanks

Gokul.



Answer this question

Pressing arrow keys doesnt trigger the KeyDown event in a text box

  • Ethan Efren

    You should use the PreviewKeyDown event, rather than KeyDown.

    Thanks,
    -Unni



  • Jaan

    Thank you
  • Pressing arrow keys doesnt trigger the KeyDown event in a text box