i:EventTrigger 的使用
<i:Interaction.Triggers> <i:EventTrigger EventName="PreviewMouseDown"> <i:InvokeCommandAction Command="{Binding Path=EditAs.EditCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:DataLayoutItemEx}}}"/> </i:EventTrigger> <i:EventTrigger EventName="MouseDoubleClick"> <i:InvokeCommandAction Command="{Binding Path=EditAs.OpenCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type controls:DataLayoutItemEx}}}" CommandParameter="{Binding ElementName=PART_Editor, Path=EditValue}"/> </i:EventTrigger> </i:Interaction.Triggers>