private void button_Click(object sender, RoutedEventArgs e) { try { if (_signInFlow.NewPlayerFlow(code.Text) == null) { ShowMessage("ERROR: Invalid code entered!"); return; } this.Frame.Navigate(typeof(NewUnassignedPlayerExplenations)); } catch (Exception ex) { ShowMessage(ex.Message); _signInFlow.SignOut(); this.Frame.Navigate(typeof(MainPage)); } }