how to create an event for keypress RRS feed

  • Question

  • i want to develop a program that has an event(user defined) in it which gets fired automatically when a key is pressed in WPF and want to retrieve that

    values of key;

    the form should not contain any other object(like botton,textbutton etc);


    • Changed type litdev Friday, March 8, 2013 1:25 PM this is a question
    Friday, March 8, 2013 10:14 AM


  • GraphicsWindow.KeyDown = OnKeyDown

    Sub OnKeyDown

      If GraphicsWIndow.LastKey = "Your Key Here" Then

    (Your code here)



    • Proposed as answer by litdev Friday, March 8, 2013 1:25 PM
    • Marked as answer by Nonki Takahashi Friday, March 15, 2013 4:41 AM
    Friday, March 8, 2013 1:08 PM