MVVM Passing EventArgs As Command Parameter

It’s not easily supported. Here’s an article with instructions on how to pass EventArgs as command parameters.

You might want to look into using MVVMLight – it supports EventArgs in command directly; your situation would look something like this:

 <i:Interaction.Triggers>
    <i:EventTrigger EventName="Navigated">
        <cmd:EventToCommand Command="{Binding NavigatedEvent}"
            PassEventArgsToCommand="True" />
    </i:EventTrigger>
 </i:Interaction.Triggers>

Leave a Comment