Вопрос

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

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top