async InputPrompt with keyDownHandler

3 posts, 1 answers
  1. Christof
    Christof avatar
    27 posts
    Member since:
    May 2013

    Posted 24 Aug 2013 Link to this post

    Hello !

    Can you give me a example how can i use the async Inputpromt with the keyDownHandler?
    Found nothing in the documentation and have no idea how to use this...

    Thanks
  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 27 Aug 2013 Link to this post

    Hi Christof,

    Thank you for writing.

    Here's an example with the keyDownHandler, used with the async implementation of the Show method:
    InputPromptClosedEventArgs args = await RadInputPrompt.ShowAsync("Title", inputMode: InputMode.Password,
        keyDownHandler: (keyArgs) =>
            {
                if (keyArgs.Key == Key.Enter)
                {
                    RadInputPrompt.Close();
                }
            });
    txt.Text = args.Text;
    This example shows a password box and when the enter key is pressed the text is written in the TextBlock named txt

    Let me know if you need further assistance.
     
    Regards,
    Todor
    Telerik
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Christof
    Christof avatar
    27 posts
    Member since:
    May 2013

    Posted 01 Sep 2013 Link to this post

    thanks for help!
Back to Top