0

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

sipsorcery
  • 30,273
  • 24
  • 104
  • 155
Jay Kannan
  • 1,372
  • 3
  • 14
  • 30

1 Answers1

0

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

Ku6opr
  • 8,126
  • 2
  • 24
  • 31
  • Thank,s but it doesn't scroll automatically when asked to focus. anything I need to look out for. it's a credit card details page. – Jay Kannan Dec 06 '11 at 15:15
  • It worked, thanks. Still need an answer for the scrollviewer though. is there a way to manually scroll it? – Jay Kannan Dec 06 '11 at 15:26