Windows phone keyboard open events and properties

后端 未结 1 1565
庸人自扰
庸人自扰 2021-01-16 01:17

On my Windows Phone app I need to change my view accordingly to my keyboard. I have several questions:

How can I identify that the keyboard is opened? Is there an e

相关标签:
1条回答
  • 2021-01-16 01:39

    You can access to keyboard information by Windows.UI.ViewManagement.InputPane class. There is static method GetForCurrentView(). It returns InputPane for current view. InputPane has events Hiding and Showing and property OccludedRect which returns region that input pane is covering.

    InputPane inputPane = InputPane.GetForCurrentView();
    inputPane.Showing += OnInputPaneShowing;
    inputPane.Hiding += OnInputPaneHiding;
    
    Rect coveredArea = inputPane.OccludedRect;
    
    0 讨论(0)
提交回复
热议问题