Frage

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

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top