private void tbox_KeyDown_1(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == Key.Enter)
//do something
}
What I want is that after the above keydownevent in textbox named tbox. I want the virtual keyboard visible on the phone screen to drop off, when I click Enter button. How could this be achieved?
you just need to set the focus to the page not the textbox.
private void tbox_KeyDown_1(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == Key.Enter)
{
this.Focus();
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.