[UWP] Windows 11 Touch Keyboard pushes up content and create blank space

Md. Niaz Mahmud
21
Reputation points
I am developing an uwp app, in windows 11, when touch keyboard shows up, the contents is pushed up and there creates blank space between my page content and touch keyboard. and when this issue happens, the page becomes draggable into that blank space and can be moved. This issue happens sometimes, not always. And this issue doesn't happen in windows 10. The code snippet is as follows:
private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)
{
args.EnsuredFocusedElementInView = true;
var parent = Page.Parent as FrameworkElement;
Page.Height = parent.ActualHeight - inputPane.OccludedRect.Height;
Page.VerticalAlignment = VerticalAlignment.Top;
}
{count} votes
Than you @Roy Li - MSFT for your response. Added MainPage.xaml and MainPage.xaml.cs in sample app where issue is reproduced.
Steps to reproduction:
-Open attached UWP sample application
-Show touch keyboard by focusing on textbox
-Observe page content is pushed up and blank space created in between
-also page content becomes movable now (only happens when this issue is produced)
-Issue occurs sometimes (only in windows 11)
Expected results:
-Should not create blank space between touch keyboard and page content
Actual results:
-Touch keyboard pushes app content up
-and makes page movable
-and create blank space between touch keyboard and page content (Sometimes)
235804-xamlcs.txt
235700-xaml.txt
I could get the xamlcs file. but the XAML code is not available. Could you please share the code by updating your question?
Also, could you please tell me what kind of device that you are testing? Is it a laptop or a surface or something else?
Xaml File Added
236397-xamlfile.txt
Hello @Roy Li - MSFT . Thank you for frequent responses. I am testing this on a Laptop, which has touch and pen input capability. OS Windows 11, Build number, 22000.856
Please check the blank space between keyboard and app page content.
I'm trying to find a laptop with tablet mode to test about this. There might be some time delay.
Sign in to comment