listbox或datagrid内容双击事件绑定

====listbox===

<DataTemplate>
<Border Width="350"
Height="230"
Margin="2"
Background="{DynamicResource Common.UC.Background.Dark}">
<Border.InputBindings>//绑定事件
<MouseBinding Command="{Binding DetailShowCommand}" MouseAction="LeftDoubleClick" />
</Border.InputBindings>

===datagrid====

<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<i:InvokeCommandAction Command="{Binding DoubleClickCommand}" CommandParameter="{Binding ElementName=dgvDeploys, Path=SelectedItem}" />
</i:EventTrigger>
</i:Interaction.Triggers>

上一篇:Serilog记录MongoDB日志报错:requires the binary sub type to be UuidLegacy, not UuidStandard


下一篇:java中<> 的用法