private void Register(object o) { RegisterRequestModel.Email = RegisterRequestModel.Email?.Trim(); string password = (o as PasswordBox).Password; if (!ValidateInput(password)) { return; } //TODO : Use the RegisterRequest in form to take directly the password as input RegisterRequestModel.Password = password; IsLoading = true; var requestResponse = Authentification.SignUp(this.RegisterRequestModel); if (requestResponse.Success) { MainTransitions.TransitionPageControl.ShowPage(new Tutorial()); } else { MessageBox.Show(requestResponse.Response); } }