Is it possible to hide the SIP (soft keyboard) in

2019-09-12 19:33发布

问题:

When the user edits a record, a XAML Popup shows a small form.

The software keyboard appears when the user gives focus to a TextBox.

This is good.

OnKeyDown (if Enter) I commit the user's changes.

After the changes are committed, I hide the XAML Popup.

The SIP remains visible even though the form is invisible.

What is the correct way to handle this scenario?

PS: this ( Show/Hide Keyboard programmatically on windows8 ) is not a solution to this problem. That's because the question is wanting to prevent it from showing. I need it to hide.

回答1:

Disable the texbox before you hide the popup, move the focus to something that won't use the keyboard (like transparent 0x0 border), perhaps?