当 SIP 在 WP7 中可见时尝试滚动时 ScrollViewer 不滚动

发布于 2024-12-20 08:09:31 字数 157 浏览 4 评论 0原文

当键盘打开时,我无法使用带有项目绑定文本框的 ScrollViewer 进行滚动。我对枚举文本框也一无所知,以便在按下 Enter 键在输入字段之间移动时可以创建类似选项卡的功能。我看了网上的一些教程,好像没有用。

在选择另一个文本框来实际输入信息之前,我需要放下键盘。有什么建议吗?

I'm having trouble getting ScrollViewer with item-bound text boxes to scroll when the keyboard is up. I'm also clueless about enumerating the textboxes so that I can create a Tab like functionality when Enter key is pressed to move between the input fields. I looked at some of the tutorials online and they don't seem to work.

I need to drop the keyboard before choosing another TextBox to actually input information. any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

泅人 2024-12-27 08:09:31

当用户使用 KeyUp 事件中的某些代码触摸“Enter”时,您可以强制关闭 SIP。

XAML

<TextBox Height='72'
           Name='textBox5'
           Text=''
           Width='460'
           KeyUp='textBox5_KeyUp' />

代码

private void textBox5_KeyUp(object sender, KeyEventArgs e)
{

  // to force the SIP to close on enter key
  if (e.Key == Key.Enter)
  {
    // be sure and set IsTabStop = true on root element
    this.Focus();
  }
}

You can force the SIP to close when the user touches 'Enter' with some code in the KeyUp event.

XAML

<TextBox Height='72'
           Name='textBox5'
           Text=''
           Width='460'
           KeyUp='textBox5_KeyUp' />

Code

private void textBox5_KeyUp(object sender, KeyEventArgs e)
{

  // to force the SIP to close on enter key
  if (e.Key == Key.Enter)
  {
    // be sure and set IsTabStop = true on root element
    this.Focus();
  }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文