WPF_DataGrid双击单元格事件
添加命名空间¶
绑定按钮
<DataGrid x:Name="datagrid">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<i:InvokeCommandAction Command="{Binding Path=DoubleClickItemCommand}" CommandParameter="{Binding ElementName=datagrid,Path=SelectedItem}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</DataGrid>
后台ViewModel