2 using System.Windows.Input;
4 namespace SpeedportHybridControl.Implementations
6 public class DelegateCommand : ICommand
8 private Action _executeMethod;
10 public DelegateCommand(Action executeMethod)
12 _executeMethod = executeMethod;
15 public bool CanExecute(object parameter = null)
20 public event EventHandler CanExecuteChanged = delegate { };
22 public void Execute(object parameter = null)
24 _executeMethod.Invoke();