ahmad
ahmad

Reputation: 55

how to hide keyboard on button click in windows phone 8.1

I need to hide the keyboard on a click button in windows phone 8.1 using c# and i trying this: SignIn.Focus(FocusState.Keyboard) but the keyboard still open

Upvotes: 0

Views: 304

Answers (1)

Romasz
Romasz

Reputation: 29792

You can try use InputPane class.

Sample:

private void HideKeyboard()
{
    var current = Windows.UI.ViewManagement.InputPane.GetForCurrentView();
    current.TryHide();
}

Upvotes: 1

Related Questions