RightMouseDownEvent 是否有望与 EventToCommand 一起使用?
我可以将命令与 PreviewMouseRightUp 和 PreviewMouseRightDown 绑定,但 MouseRightButtonDown 什么也不做。我是否使用了错误的事件名称——就这么简单吗?
在 xaml 中——我将两个事件绑定到同一个处理程序——只有一个有效(预览...向上)。我依次注释掉每个,但只有预览有效。
想法?谢谢!
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<cmd:EventToCommand Command="{Binding SetActivePaneCommand}" CommandParameter="{Binding PaneOne}" PassEventArgsToCommand="False" />
<cmd:EventToCommand Command="{Binding ListSelectionChangedCommand}" PassEventArgsToCommand="True" />
</i:EventTrigger>
<i:EventTrigger EventName="MouseRightButtonDown">
<cmd:EventToCommand Command="{Binding PreviewMouseRightButtonUpCommand}" PassEventArgsToCommand="True" />
</i:EventTrigger>
<i:EventTrigger EventName="PreviewMouseRightButtonUp">
<cmd:EventToCommand Command="{Binding PreviewMouseRightButtonUpCommand}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>