jkmills78
8/19/2016 - 2:21 PM

Delegate Command Implementation

Delegate Command Implementation

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace MyApp.ViewModel
{
    public class DoCommand
    {
        public ICommand DoThisCommand
        {
            get { return new DelegateCommand(RunThis); }
        }

        private void DoThis()
        {
          OtherClass otherClass = new OtherClass();
          otherClass.Execute();
        }
    }
}