MVVM light to Prism conversion

Jul 6, 2015 at 12:34 PM
Edited Jul 6, 2015 at 12:34 PM
How would I achieve the following in Prism (this is MVVM light)?

<i:Interaction.Triggers>
                        <local:RoutedEventTrigger RoutedEvent="{x:Static Validation.ErrorEvent}">
                            <e2c:EventToCommand
                                                    Command="{Binding EditVM.TheEntity.ConversionErrorCommand, Mode=OneWay}"
                                                    EventArgsConverter="{StaticResource BindingErrorEventArgsConverter}"
                                                    PassEventArgsToCommand="True" />
                        </local:RoutedEventTrigger>
                        <local:RoutedEventTrigger RoutedEvent="{x:Static Binding.SourceUpdatedEvent}">
                            <e2c:EventToCommand
                                                    Command="{Binding EditVM.TheEntity.SourceUpdatedCommand, Mode=OneWay}"
                                                    EventArgsConverter="{StaticResource BindingSourcePropertyConverter}"
                                                    PassEventArgsToCommand="True" />
                        </local:RoutedEventTrigger>
                    </i:Interaction.Triggers>
Jul 6, 2015 at 2:31 PM
Use the InvokeCommandAction behavior that is in the Prism.Interactivity library in Prism 5. It adds the ability to harvest event parameters when hooked up with an event trigger. See the Interactivity QuickStart for an example of its use.