HandyControl/HandyControlDemo/ViewModel/WindowDemoViewModel.cs
NaBian fffbdbb4a9 add some demos & styles
1. add window demo
2. add scrollviewer demo
3. add radiobutton style
4. fixed some bugs
5. add research project
2018-10-23 19:59:59 +08:00

19 lines
555 B
C#

using System;
using GalaSoft.MvvmLight.CommandWpf;
using HandyControlDemo.Tools;
namespace HandyControlDemo.ViewModel
{
public class WindowDemoViewModel
{
public RelayCommand<string> OpenWindowCmd => new Lazy<RelayCommand<string>>(() => new RelayCommand<string>(OpenWindow)).Value;
private void OpenWindow(string windowTag)
{
if (AssemblyHelper.CreateInternalInstance($"Window.{windowTag}") is System.Windows.Window window)
{
window.ShowDialog();
}
}
}
}