'Enter' key in AutoSuggestBox calls to QuerySubmitted event, like clicking the icon. It is a Windows 10 project.
I need to discriminate the Enter key because I use it to go to the next field. I tried KeyDown event, but it is not called.
How can I do it?
Don't ask me why, but you need to use KeyUp
event and everything works fine.
Ex:
private void ContactsBox_KeyUp(object sender, KeyRoutedEventArgs e)
{
if (e.Key == Windows.System.VirtualKey.Enter)
{
//some stuff here
}
}
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