Exemplo n.º 1
0
        private void ShowNotificationMessage(string message)
        {
            if (_dialogService == null)
            {
                return;
            }
            var notificationDialogViewModel = new NotificationDialogViewModel(message);

            _dialogService.ShowDialog(notificationDialogViewModel);
        }
Exemplo n.º 2
0
        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);
            }
        }