In a TextBox input. After type enter key, i want to hide soft keyboard. How to do it in codes?
private void OnKeyDownHandler(object sender, KeyEventArgs e)
{
if (e.Key != Key.Enter)
return;
...}
this.focus()
This will allow the focus to be lost from the textbox. It basically puts the focus on the page instead. You could also convert your textbox to read only
to disallow any further input.
Hiding the SIP can be done by simply changing the focus from the textbox to any other element on the page. It does not have to be this.focus(), it could be anyElement.focus(). As long as the element is not your textbox, the SIP should hide itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With