How to bind EventArgs and Command Parameter both together to a Command Event.
xmlns:cmd="http://www.galasoft.ch/mvvmlight"xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
<i:Interaction.Triggers>
<i:EventTriggerEventName="SelectionChanged"><cmd:EventToCommandCommand="{Binding SelectionChangedCommand}"PassEventArgsToCommand="True"
CommandParameter="Parameter"/>private RelayCommand<object> _selectionChanged;
</i:EventTrigger></i:Interaction.Triggers>
public RelayCommand<object> SelectionChanged
{
get
{
return _selectionChanged
?? (_selectionChanged = new RelayCommand<object>(
async (_userTypeString) =>
{
});
}
}
This is my code. In my View Model on command action, I am getting only the Command Parameter and not the Event Args. How to get both of them together ?