Reputation: 749
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?
Upvotes: 0
Views: 758
Reputation: 980
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();
}
}
Upvotes: 1