private void UserNameBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == System.Windows.Input.Key.Enter && UserNameBox.Text != "") { FakePasswordBox.Focus(); } }
private void LoginPage_Loaded(object sender, RoutedEventArgs e) { Pivot.Background = (ImageBrush)App.Current.Resources["BackgroundBrush"]; var settings = IsolatedStorageSettings.ApplicationSettings; if (settings.Contains("UserName")) { UserNameBox.Text = (string)settings["UserName"]; UserNameBox.Foreground = new SolidColorBrush(Colors.Black); FakePasswordBox.Focus(); settings.Remove("UserName"); settings.Save(); } else { UserNameBox.Focus(); } }