Skip to content
This repository has been archived by the owner on Aug 17, 2020. It is now read-only.

Commit

Permalink
Hiding keyboard on pressing return key in password box
Browse files Browse the repository at this point in the history
Hiding keyboard on pressing return key in password box by setting the
focus on loginbutton.
  • Loading branch information
bkardol committed Aug 2, 2016
1 parent e15120e commit e552951
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PokemonGo-UWP/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ public MainPage()

private void passwordBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
{
if (e.Key == Windows.System.VirtualKey.Enter && loginButton.Command.CanExecute(null) == true)
if (e.Key == Windows.System.VirtualKey.Enter)
{
loginButton.Command.Execute(null);
}
loginButton.Focus(Windows.UI.Xaml.FocusState.Programmatic);
}
}
}
}

0 comments on commit e552951

Please sign in to comment.