using System;
using System.Windows.Input;
using System.Diagnostics;
using System.Threading;

namespace Symphony.Care5000.MainMaster
{
    public class Command : ICommand
    {
        private readonly Action _handler;
        Func canExecute;
        Action executeAction;

        public Command(Action handler)
        {
            _handler = handler;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            _handler();
        }

        public Command(Action executeAction, Func canExecute)
        {
            this.executeAction = executeAction;
            this.canExecute = canExecute;
        }

        #region ICommand Members
        public event EventHandler CanExecuteChanged = null;

        #endregion
    }
}

Replies

Know the answer? Post it — somebody with the same question will find it here.