namespace Playground.Module.Dialogs; internal class NotificationDialogViewModel : BindableBase, IDialogAware { public NotificationDialogViewModel() { CloseCommand = new DelegateCommand(() => RequestClose.Invoke(new DialogResult(ButtonResult.OK))); } private string _title = string.Empty; public string Title { get => _title; set => SetProperty(ref _title, value); } private string _message = string.Empty; public string Message { get => _message; set => SetProperty(ref _message, value); } public DelegateCommand CloseCommand { get; } public DialogCloseListener RequestClose { get; set; } public bool CanCloseDialog() => true; public void OnDialogClosed() { } public void OnDialogOpened(IDialogParameters parameters) { Title = parameters.GetValue("title") ?? string.Empty; Message = parameters.GetValue("message") ?? string.Empty; } }