improved tabcontrol

This commit is contained in:
NaBian committed 2019-05-16 22:59:48 +08:00
1 parent 452dc847d7
commit 24612e0e5e
7 files changed
+147 -40

No files matched your search

@@ -0,0 +1,32 @@
using System;
using System.Windows;
using GalaSoft.MvvmLight;
using HandyControl.Controls;
using HandyControl.Data;
#if netle40
using GalaSoft.MvvmLight.Command;
#else
using GalaSoft.MvvmLight.CommandWpf;
#endif
namespace HandyControlDemo.ViewModel
{
public class TabControlDemoViewModel : ViewModelBase
{
public RelayCommand<CancelRoutedEventArgs> ClosingCmd => new Lazy<RelayCommand<CancelRoutedEventArgs>>(() =>
new RelayCommand<CancelRoutedEventArgs>(Closing)).Value;
private void Closing(CancelRoutedEventArgs args)
{
Growl.Info($"{(args.OriginalSource as TabItem)?.Header} Closing");
}
public RelayCommand<RoutedEventArgs> ClosedCmd => new Lazy<RelayCommand<RoutedEventArgs>>(() =>
new RelayCommand<RoutedEventArgs>(Closed)).Value;
private void Closed(RoutedEventArgs args)
{
Growl.Info($"{(args.OriginalSource as TabItem)?.Header} Closed");
}
}
}