locked
How to verify a key entered by user in textbook, Store App

    Question

  • In a Store App (locally), I have textbox where user enters a key. I have an eventhandler for KeyDown.
    I would like to do the following inside the event  handler.
    if (e.Key.Equals(Key.Enter) || e.Key.Equals(Key.Return), then do something....

    This works in WPF, using KeyEventArgs, it does not work in the StoreApp. In WPF I am using KeyEventsArgs. StoreApps requires KeyRoutedEventArgs.

    I cannot seem to find the "Key" enumeration (System.Windows.Input) in my StoreApps project, but I can find it WPF project.

    How can I validate what key is entered by the user with a StoreApps?

    Thank you,

    Saleem


    M. Saleem Yusuf

    Thursday, March 19, 2015 6:25 PM

Answers

  • Thank you. VirtualKey worked.

    M. Saleem Yusuf

    • Marked as answer by Saleem Yusuf Thursday, March 19, 2015 7:50 PM
    Thursday, March 19, 2015 7:50 PM

All replies