using System; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using HandyControl.Controls; using HandyControl.Data; namespace HandyControlDemo.ViewModel { public class SideMenuDemoViewModel : ViewModelBase { public RelayCommand> SwitchItemCmd => new Lazy>>(() => new RelayCommand>(SwitchItem)).Value; private void SwitchItem(FunctionEventArgs info) => Growl.Info((info.Info as SideMenuItem)?.Header.ToString()); public RelayCommand SelectCmd => new Lazy>(() => new RelayCommand(Select)).Value; private void Select(string header) => Growl.Success(header); } }