When the software keyboard is shown, it occludes part of the page UI. That is undesirable. Is there a way to automatically update the UI layout just like Android Activity's onConfigurationChanged?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
It appears that one needs to register handler to update the layout:
To handle the event, we can make use of
OccludedRect
in the event argument from which we can extract the height taken by the keyboard. First, we preserve some UI element, saySpaceForKeyboard
, in the XAML. For example:Then in the handler, just change the size for the preserved space:
As simple as it should be, when the keyboard is shown/hidden, the handler is invoked and it sets (or hide) the dummy grid to occupy the space where the keyboard is shown.