Question

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

Was it helpful?

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...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top