private void ConfirmSave() { if (!parentModel.IsDocumentValid()) { this.parentModel.IsShowingErrors = true; } if (parentModel.Key != null && parentModel.Key.StartsWith("Raven/", StringComparison.InvariantCultureIgnoreCase)) { AskUser.ConfirmationAsync("Confirm Edit", "Are you sure that you want to edit a system document?") .ContinueWhenTrueInTheUIThread(SaveDocument); return; } if (parentModel.EditingDatabase) { AskUser.ConfirmationAsync("Confirm Edit", "Are you sure that you want to change the database document? This could cause irreversible damage") .ContinueWhenTrueInTheUIThread(SaveDatabaseDocument); return; } SaveDocument(); }