public async void AcceptButton() { this.IsFormEnabled = false; this.NotifyOfPropertyChange(() => this.IsFormEnabled); var helper = new RegistrationHelper(); try { var validationResult = await helper.ExternalRegistration(this); if (validationResult.IsValid) { await this.TryCloseAsync(); Show.SuccesBox(validationResult.Message); } else { Show.ErrorBox(validationResult.Message); this.IsFormEnabled = true; this.NotifyOfPropertyChange(() => this.IsFormEnabled); } } catch (RegistrationException exception) { Show.ErrorBox(exception.Message); this.IsFormEnabled = true; this.NotifyOfPropertyChange(() => this.IsFormEnabled); } }