在 WPF 的 MVVM 中处理多个鼠标事件

Handling Multiple Mouse Events in MVVM in WPF

我正在关注以下讨论, Handling Mouse Events in MVVM in WPF 它适用于一个事件,但当我尝试多个事件时,它不起作用。

I want to bind multiple events like below:

<i:Interaction.Triggers>
      <i:EventTrigger 
     EventName="PreviewMouseLeftButtonDown">
     <i:InvokeCommandAction Command="{Binding TripLegCopyIconPressedCommand}"/>
      </i:EventTrigger>
     <i:EventTrigger EventName="PreviewMouseLeftButtonUp">
     <i:InvokeCommandAction Command="{Binding 
               TripLegPreviewMouseLeftButtonUpCommand}"/>
      </i:EventTrigger>
    </i:Interaction.Triggers>

But it is not working. How to do that? Any idea?

谢谢。

据我了解,多事件绑定是可行的,但不推荐。