add Recommendation

This commit is contained in:
NaBian committed 2019-05-28 23:47:07 +08:00
1 parent ee4125e2bf
commit cf5f84869d
33 files changed
+320 -141

No files matched your search

@@ -0,0 +1,22 @@
using System;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf;
using GalaSoft.MvvmLight.Messaging;
using HandyControlDemo.Data;
using HandyControlDemo.Tools;
namespace HandyControlDemo.ViewModel
{
public class NoUserViewModel : ViewModelBase
{
public RelayCommand<string> OpenViewCmd => new Lazy<RelayCommand<string>>(() =>
new RelayCommand<string>(OpenView)).Value;
private void OpenView(string viewName)
{
Messenger.Default.Send<object>(null, MessageToken.ClearLeftSelected);
Messenger.Default.Send(true, MessageToken.FullSwitch);
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{viewName}"), MessageToken.LoadShowContent);
}
}
}