locked
WPF Textbox KeyUp and KeyDown RRS feed

  • Question

  • Google is failing me this morning. Hopefully someone can help real quick with this simple WPF problem.

     

    I find that backspace and spacebar do not cause the KeyUp or KeyDown events to fire for a WPF textbox. Anyone have a solution for this?

     

    Thanks a million,

    Brent

    Thursday, August 23, 2007 2:46 PM

Answers

  • It seems that you should process PreviewKeyDown. it is handled by wpf so willn't fire KeyDown event.

     

    Thursday, August 23, 2007 3:07 PM

All replies

  • It seems that you should process PreviewKeyDown. it is handled by wpf so willn't fire KeyDown event.

     

    Thursday, August 23, 2007 3:07 PM
  • Yes that's it . Thank you.
    Thursday, August 23, 2007 4:00 PM
  • I just discovered this myself today; The question I have is "Is this a bug or a feature?" Is there any reason why key up/down events don't fire in these circumstances?
    Monday, June 16, 2008 9:13 PM