add Dialog

This commit is contained in:
NaBian committed 2019-03-12 00:47:25 +08:00
1 parent e6719725df
commit 9a77cf2086
17 files changed
+174 -14

No files matched your search

@@ -0,0 +1,19 @@
using System;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
using HandyControl.Controls;
using HandyControlDemo.UserControl;
namespace HandyControlDemo.ViewModel
{
public class DialogDemoViewModel : ViewModelBase
{
public RelayCommand ShowTextCmd => new Lazy<RelayCommand>(() =>
new RelayCommand(ShowText)).Value;
private void ShowText()
{
Dialog.Show(new TextDialog());
}
}
}
@@ -24,6 +24,7 @@ namespace HandyControlDemo.ViewModel
SimpleIoc.Default.Register<PaginationDemoViewModel>();
SimpleIoc.Default.Register<ChatBoxViewModel>();
SimpleIoc.Default.Register<CoverViewModel>();
SimpleIoc.Default.Register<DialogDemoViewModel>();
}
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
@@ -51,6 +52,8 @@ namespace HandyControlDemo.ViewModel
public CoverViewModel CoverView => ServiceLocator.Current.GetInstance<CoverViewModel>();
public DialogDemoViewModel DialogDemo => ServiceLocator.Current.GetInstance<DialogDemoViewModel>();
#endregion
}
}