【问题标题】:WinRT how to not have page go up when virtual key board appears Windows Phone 8.1WinRT如何在出现虚拟键盘时没有上页 Windows Phone 8.1
【发布时间】:2015-05-14 23:50:39
【问题描述】:

我在 Windows Phone 8.1 应用程序的 XAML 页面中有一个 AutoSuggestBox,当我单击 AutoSuggestBox 时,整个页面都会上升。有谁知道如何禁用此功能?

谢谢

编辑: 这是代码修复,谢谢 Peter Torr - MSFT。

Windows.UI.ViewManagement.InputPane.GetForCurrentView().Showing += (s, args) =>
            {
                args.EnsuredFocusedElementInView = true;
            };

【问题讨论】:

    标签: c# xaml windows-phone-8.1 winrt-xaml


    【解决方案1】:

    您需要处理InputPane.Showing 事件,并将EnsuredFocusedElementInView 属性设置为true。这将阻止 Windows 尝试使该项目进入视野。

    【讨论】:

      猜你喜欢
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多