private async void Exit() { if (this.savingNeeded) { MessageViewerEventArgs result = await this._messageViewer.DisplayMessage("Settings have not been saved, are you sure you want to exit?", "Discard Changes?", MessageViewerButton.OkCancel); if (result.Result == MessageViewerResult.Ok) { this.ClosePopup(null); } } else { this.ClosePopup(null); } }
private void CloseMessageViewer(MessageViewerEventArgs e) { this.ActiveMessage = ""; this.IsMessageActive = false; this.messageTaskCompletionSource.SetResult(e); }