Pergunta

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

Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top