support for .NET framework 3.5

Still have bugs
This commit is contained in:
NaBian committed 2019-01-21 00:43:10 +08:00
1 parent 5878039e21
commit 7d6b491f25
704 files changed
+48273 -33

No files matched your search

@@ -0,0 +1,23 @@
using System.Windows;
using GalaSoft.MvvmLight.Command;
using HandyControlDemo.Tools;
namespace HandyControlDemo.ViewModel
{
public class WindowDemoViewModel
{
private RelayCommand<string> _openWindowCmd;
public RelayCommand<string> OpenWindowCmd =>
_openWindowCmd ?? (_openWindowCmd = new RelayCommand<string>(OpenWindow));
private void OpenWindow(string windowTag)
{
if (AssemblyHelper.CreateInternalInstance($"Window.{windowTag}") is System.Windows.Window window)
{
window.Owner = Application.Current.MainWindow;
window.ShowDialog();
}
}
}
}