Reputation: 21
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?
Upvotes: 2
Views: 1257
Reputation: 5724
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)
{
}
Upvotes: 6