Windows Phone 8 scrolling when keyboard visible

…衆ロ難τιáo~ 提交于 2020-01-16 00:50:24

问题


I've searched loads for an answer to my problem.

Basically on my WP8 app, I have an "add record" page and a list of text boxes. I can scroll up and down the full length of the page fine, but when I tap one of the text boxes and the keyboard appears, I can no longer scroll to the very bottom and therefore can't complete the last couple text boxes.

Now, if you have a look at the MS calendar app on WP8, the "new appointment" page has a similar thing - when you tap one of the text boxes you can still scroll the whole way up and down.

I was wondering, is there anywhere I can see the XAML that MS have used? Then I can learn from that. I'm sure it's as simple as setting a height property or something but I've been stumped on this for a while now.

Rather than posting my XAML etc, does anyone know where I can get a look at the XAML for the MS stock apps? If this is even possible...

Thanks


回答1:


I had the same issue. but at last i solved it, i just used the Height property to do this. i already answered for the same type of problem posted by someone.Please do the following steps

  • First create a ScrollViewer
  • Indide the ScrollViewer create a container(eg: Grid/StackPanel/Border etc...) and put every controlls inside it.
  • Set fixed Height for ScrollViewer and the Container (Note: Height of container should be greater than ScrollViewer's Height)

See the below Code

<ScrollViewer Height="500">
        <Grid Name="Container" Height="700">
            <TextBox/>
            <TextBox/>
            <TextBox/>
        </Grid>
</ScrollViewer>

Now you can scroll the container Grid Even the KeyBoard shown or even focus on a TextBox.



来源:https://stackoverflow.com/questions/19754526/windows-phone-8-scrolling-when-keyboard-visible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!