I'm little confused about RelayCommand
and EventToCommand
in Mvvmlight.
It seems that EventToCommand
handle the EventTrigger
and call a RelayCommand
to do job.
Such as:
<i:Interaction.Triggers>
<i:EventTrigger x:Uid="i:EventTrigger_1" EventName="MouseLeftButtonUp">
<cmd:EventToCommand x:Uid="cmd:EventToCommand_1" Command="{Binding Form_MouseLeftButtonUpCommand}" PassEventArgsToCommand="True"/>
</i:EventTrigger>
</i:Interaction.Triggers>
Is my understanding correct?
So, can we use RelayCommand
directly with EventTrigger
, no need to use EventToCommand
?
Thanks for your help!