As you know you can't bind an Event directly to a command without a behaviour:
<DataGrid>
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseDoubleClick">
<i:InvokeCommandAction Command="{Binding TradeEntryCommand"} />
</i:EventTrigger>
</i:Interaction.Triggers>
</DataGrid>
This works perfectly fine, however now I have to refactor this from double clicking the DataGrid itself to double clicking the Cell. (I don't care which cell was clicked)
I was hoping to define this behviour now inside the Cell Style like this:
<Style x:Key="DefaultCellStyleBase" TargetType="{x:Type DataGridCell}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridCell}">
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="PreviewMouseDoubleClick">
?????????
</EventTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<!-- ... -->
</Style>
But how would I bring in the behaviour from above to fire the command?
Highly appreciated,