键盘可见时 Windows Phone 8 滚动 [英] Windows Phone 8 scrolling when keyboard visible

查看:47
本文介绍了键盘可见时 Windows Phone 8 滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索了大量的问题的答案.

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

基本上在我的 WP8 应用程序上,我有一个添加记录"页面和一个文本框列表.我可以很好地上下滚动页面的整个长度,但是当我点击其中一个文本框并出现键盘时,我无法再滚动到最底部,因此无法完成最后几个文本框.

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.

现在,如果你看看 WP8 上的 MS 日历应用,新约会"页面也有类似的东西——当你点击其中一个文本框时,你仍然可以上下滚动.

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.

我想知道,有什么地方可以看到 MS 使用过的 XAML?那我可以从中吸取教训.我确信它就像设置高度属性或其他东西一样简单,但我已经被这个问题难住了一段时间.

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.

不是发布我的 XAML 等,有谁知道我可以在哪里查看 MS 股票应用程序的 XAML?如果这甚至可能...

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

谢谢

推荐答案

我遇到了同样的问题.但最后我解决了它,我只是使用了 Height 属性来做到这一点.我已经回答了某人发布的相同类型的问题.请执行以下步骤

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

  • 首先创建一个ScrollViewer
  • Indide ScrollViewer 创建一个容器(例如:Grid/StackPanel/Border 等...)并将每个控件放入其中.
  • 为ScrollViewer和Container设置固定高度(注意:Container的高度应该大于ScrollViewer的高度)

查看下面的代码

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

这篇关于键盘可见时 Windows Phone 8 滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆