Command with TypeParameter for the Action

Apr 3, 2013 at 2:02 PM
Want implement an example in my WPF Project with Catel

Problem: In the example Project the RelayCommand class has an TypeParameter for the Action
public RelayCommand(Action<T> execute)
     : this(execute, null)
{
}
How to solve that in catel?
Coordinator
Apr 4, 2013 at 10:00 PM
You can use a Command<TParameter>. Then you will have methods that have On[Command]Executed(TParameter parameter). Or do you need the actual object being passed in?
Apr 5, 2013 at 8:26 AM
Or do you need the actual object being passed in?
Yes.
Apr 5, 2013 at 10:01 AM
Ok. Solved it.

Need EventsToCommands and PassParameters set to True. Thanks.
Coordinator
Apr 5, 2013 at 10:31 AM
Ah, you were using it in a behavior. Ok, great you solved it.