windows-phone-7scrollviewerinputscope

Watching the InputScope of a TextBox?


How do we grab the event that is generated when the inputscope of a TextBox is set to search and the Arrow is pressed?


Solution

  • 1.There is an event OnKeyDown where you can check what key is pressed

    textBox.OnKeyDown += (s, e) =>
    {
        if (e.Key == Key.Enter)
        {
            // perform search
            e.Handler = true;
        }
    }
    

    2.ScrollViewer automatically scrolls to focused textbox, I guess...