Hide Keyboard in WP 8.1

Before WP 8.1 came out, we can easily use this.Focus() to hide soft keyboard, by moving the focus to other element.

In WP 8.1, it changed a little bit. We can use InputPane class that available from Windows.UI.ViewManagement. Use “TryHide” & “TryShow” for hiding as well as showing keyboard.

//To hide keyboard
InputPane.GetForCurrentView().TryHide();
//To show keyboard
InputPane.GetForCurrentView().TryShow();

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s