【问题标题】:touch keyboard show property on windows 8 metro appWindows 8 Metro 应用程序上的触摸键盘显示属性
【发布时间】:2013-12-06 00:55:24
【问题描述】:

我正在开发一个 Windows 8 应用程序,其中我在屏幕左下方有一个弹出对话框,如果显示触摸键盘,则弹出窗口不可见,是否有一个属性来确定是否显示键盘,如果显示触摸键盘,则向上移动弹出窗口。

【问题讨论】:

    标签: wpf windows microsoft-metro


    【解决方案1】:

    查看这篇博文:Tips and Tricks for C# Metro developers: Handling the virtual keyboard

    您可以使用InputPaneShowingHiding 事件。这里flyoutPopup 对象。

    int flyoutOffset = 0;
    Windows.UI.ViewManagement.InputPane.GetForCurrentView().Showing += (s, args) =>
    {
        flyoutOffset = (int)args.OccludedRect.Height;
        flyout.VerticalOffset -= flyoutOffset;
    };
    Windows.UI.ViewManagement.InputPane.GetForCurrentView().Hiding += (s, args) =>
    {
        flyout.VerticalOffset += flyoutOffset;
    };
    

    【讨论】:

      猜你喜欢
      • 2014-01-14
      • 2014-01-25
      • 2014-10-22
      • 1970-01-01
      • 1970-01-01
      • 2016-07-13
      • 2015-11-22
      • 1970-01-01
      • 2016-05-01
      相关资源
      最近更新 更多