using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Input; namespace MvvmScaffoldFrame48.ViewModel { public class RelayCommand : ICommand { public event EventHandler CanExecuteChanged; private Action _Excute { get; set; } private Predicate _CanExcute { get; set; } public RelayCommand(Action ExcuteMethod, Predicate CanExcuteMethod) { _Excute = ExcuteMethod; _CanExcute = CanExcuteMethod; } public bool CanExecute(object parameter) { return _CanExcute(parameter); } public void Execute(object parameter) { _Excute(parameter); } } }