0

Is there a way to scroll-up view the required amount when the soft-keyboard shows up? The page in my app has a lot of textboxes and when the keyboard shows up, a lot of them hide under it and the user has to manually scroll down/hide keyboard to enter values in the other textboxes.

How can I scroll-up the page by some amount to improve UX?

nimbudew
  • 958
  • 11
  • 28

1 Answers1

1

You can have a KeyDown event set for each textbox and inside event handler check if Enter key is pressed shift focus to next textbox.

KeyDown="txtMessage1_KeyDown"

  private void txtMessage1_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.Key == Key.Enter)
        {
          nextTextbox.Focus();
        }
    }
Nishi
  • 614
  • 4
  • 18
  • Yeah, that's good. But what I want is some way to alter the amount a text-box initially scrolls up when the keyboard opens up. So, for example, if by default the text-box moves to 40 px from the top when keyboard shows up, is there a way to manually adjust that amount and fix it to say 20 px from top so other UI elements are also visible? – nimbudew Jun 22 '15 at 07:08
  • I have posted one solution http://stackoverflow.com/questions/30779407/how-to-adjust-screen-when-keyboard-open-in-windows-phone-8/30786588#30786588 for the same. Try this. – Nishi Jun 22 '15 at 08:25
  • Not yet, no. The example doesn't work for me. The textbox still hides under the keyboard – nimbudew Jun 24 '15 at 09:07