How to pass a parameter to a command in Xamarin iOS?

May 30, 2015 at 10:39 PM
I have this binding:

RejectBtn.SetCommand("TouchUpInside", Vm.RejectCommand);

RelayCommand<string> _rejectCommand;
public RelayCommand<string> RejectCommand
{
get
{
    return _rejectCommand ?? (_rejectCommand = 
            new RelayCommand<string>(
        async (param) =>
        {

        }));
}
}

How do i pass a parameter?
Coordinator
Jun 17, 2015 at 7:09 AM
For now, you need to create a Binding to the parameter. Are you looking at a fixed value parameter? For the moment I am not supporting that, but I will add it in a future release. For the moment, you should ignore the SetCommand button, and use

RejectBtn.TouchUpInside+= (s, e) =>
{
Vm.RejectCommand.Execute(YOUPARAMETERHERE);
}

Laurent