2

I tried using a parameter with Catel's Command:

public Command MyCommand { get; private set; }

MyCommand = new Command(MyCommand_Execute);

private void MyCommand_Execute(object parameter)
{
}

and get the following error:

The best overloaded method match for 'Catel.MVVM.Command.Command(System.Action, System.Func, object)' has some invalid arguments

I followed the sample Catel code, any ideas?

jeffm
  • 3,120
  • 1
  • 34
  • 57

1 Answers1

6

The finalize this question with an actual answer:

Use the generic implementation of the Command class, which is Command:

public Command<int> MyCommand { get; private set; }

MyCommand = new Command<int>(MyCommand_Execute);

private void MyCommand_Execute(int parameter)
{
}
Geert van Horrik
  • 5,689
  • 1
  • 18
  • 32