Prism's InvokeCommandAction
will pass the event args by default if CommandParameter
is not set.
Here is an example. Note the use of prism:InvokeCommandAction
instead of i:InvokeCommandAction
.
<i:Interaction.Triggers>
<i:EventTrigger EventName="Sorting">
<prism:InvokeCommandAction Command="{Binding SortingCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
The ViewModel
private DelegateCommand<EventArgs> _sortingCommand;
public DelegateCommand<EventArgs> SortingCommand => _sortingCommand ?? (_sortingCommand = new DelegateCommand<EventArgs>(OnSortingCommand));
private void OnSortingCommand(EventArgs obj)
{
//do stuff
}
There is a new version of the Prismlibrary documentation.