private void ShowNotificationMessage(string message) { if (_dialogService == null) { return; } var notificationDialogViewModel = new NotificationDialogViewModel(message); _dialogService.ShowDialog(notificationDialogViewModel); }
public static async Task Show(string message, string buttonCaption) { try { var winningDialogViewModel = new NotificationDialogViewModel(message, buttonCaption); var view = new NotificationDialog { DataContext = winningDialogViewModel }; await DialogHost.Show(view, "RootDialog"); winningDialogViewModel.Dispose(); } catch { MessageBox.Show(message); } }