How to hide Windows Phone 8.0 and Windows Phone 8.1 soft keyboard?

There is direct API support to hide and show the InputPane. You don’t need to try to fake out the system. The Windows.UI.ViewManagement.InputPane.GetForCurrentView().TryHide(); and Windows.UI.ViewManagement.InputPane.GetForCurrentView().TryView(); methods are available on Windows Phone 8.1. Here’s the required code.

If you are working on a Windows Phone 8/Windows Phone 8.1 Silverlight application then use the KeyUp event of the input control and set the Focus to some other UI element.

In the handler of the KeyUp event, we make the text box lose focus by focusing the page, which results in the soft keyboard being hidden.

Vivek Maskara

I am pursuing BTech in Software Engineering from Delhi Technological University. I develop apps, create websites and blog about my app experiences.

Read more:
How to create your first Windows Phone app
How to change the App name and Tile name of your Windows phone app
Data binding in Windows Phone app – One way binding