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.