We have a Windows Store app that requires the entry of a username and password for accessing a service. When authentication fails connecting to the service we display a popup asking to re-enter their username and password.
On a tablet when the user puts the focus on the username or password fields the soft keyboard is displayed correctly. Our login screen is adjusted on detection of the soft keyboard so that all fields and buttons are visible.
This all works no problem and when they enter their details and tap on the login button the popup is closed and the app continues.
However for some reason I cannot work out if the user has the focus on the Username textbox and then taps on the login button the soft keyboard is not hidden. The popup is dismissed and the app continues but it leaves the soft keyboard displayed. If the focus was in the password box then the keyboard is hidden as expected.
I have tried setting the focus to the button controls in the button click events but this does not solve the issue. Possibly because the button clicks also close the popup control.
Has anyone come across this before? Apart from setting the focus to another control (which isn't working in my situation) is there any other way to close the soft keyboard?