Question

I'm writing a Windows Store App. It is a share target that allows the user to update product photos that are used in the main application. When the user shares a photo from another app, and chooses my app as the target, it allows the user to select the products that they want to update, displays both the old photo and the new photo that was shared, then gives the user the option to replace the photo. The process of finding the product to update involves the user entering text in a TextBox.

There are a couple of problems. First, it seems that the page that I get to work with when used as a share target is only a flyout, not the full screen. So, right off the bat, I only have less than half the screen to work with (the left half).

The other problem is that the tablet's on screen keyboard immediately comes up and covers the lower half of the screen because the TextBox has focus. So now, only the upper left quarter of the screen is visible, which gives me very little real estate to work with.

Is this just a normal thing that I have to deal with, and does everyone just design their share target window to use only that tiny amount of space? Or does anyone have any other solutions?

Was it helpful?

Solution

Nothing prevents you from handling the presentation of the soft keyboard.

Windows.UI.ViewManagement.InputPane
    .GetForCurrentView().Showing += (s, e) => { /* do something */ };

Moreover, nothing prevents you from adjusting your UI to account for the height of the soft keyboard so your UI remains completely usable.

var _KeyboardHeight = (int)e.OccludedRect.Height;

I know you would prefer this be handled by the operating system. It's not. I am sorry about that. It is what it is. At least we can account for it.

Best of luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top