how can I binding mutli parameters to Command

Jul 18, 2013 at 5:24 PM
I use MVVM light for my windows phone project, and now I need pass 2 CommandParameters to RelayCommand, but I was not find any useful information. so anyone who can help me?
Jul 22, 2013 at 4:33 PM
avril23 wrote:
I use MVVM light for my windows phone project, and now I need pass 2 CommandParameters to RelayCommand, but I was not find any useful information. so anyone who can help me?
I think this has already been answered

http://mvvmlight.codeplex.com/discussions/214548

If your using EventToCommand and your binding to an event you can pass the events parameters to a RelayCommand

View
<i:Interaction.Triggers>
                    <i:EventTrigger EventName="SelectionChanging">
                        <mvvm:EventToCommand Command="{Binding commandActivateModule}" PassEventArgsToCommand="True"  />
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </telerik:RadCarousel>
VM
this.commandActivateModule = new RelayCommand<object>((s) => SelectModule(s as Telerik.Windows.Controls.SelectionChangingEventArgs));
Binding the params as properties to the VM and then just calling the relaycommand might be enough or you can wrap up you params into a class and pass that class to the RelayCommand as it only accepts one parameter.