Add a InteractiveDialog demo for the DialogExtension.

This commit is contained in:
Dingping Zhang committed 2019-04-03 00:37:10 +08:00
1 parent 70d4a39e3b
commit e9329ef982
11 files changed
+338 -159

No files matched your search

@@ -0,0 +1,36 @@
using System;
using System.Windows.Input;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
using HandyControl.Tools.Extension;
namespace HandyControlDemo.ViewModel.Basic
{
public class InteractiveDialogViewModel : ViewModelBase, IDialogResultable
{
private string _message;
public object Result { get; set; }
public Action ClosureToken { get; set; }
public ICommand CloseCommand { get; }
public string Message
{
get => _message;
set => Set(ref _message, value);
}
public InteractiveDialogViewModel()
{
CloseCommand = new RelayCommand<string>(result =>
{
Result = result;
ClosureToken();
});
}
}
}