0
Existe-t-il un moyen d'ajouter un événement DoubleClickEvent à chaque ligne dans xaml plutôt que d'utiliser l'événement de la commande dataagrid?Ajouter EventToCommand à chaque ligne dans xaml
Quelque chose comme ça (ce code ne fonctionne pas):
<UserControl
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" >
<xcdg:UserControl.Resources>
<Style TargetType="xcdg:DataRow">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDoubleClick">
<cmd:EventToCommand Command="{Binding SelectCommand, Mode=Default}" CommandParameter="{Binding SelectedItem, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type xcdg:DataGridControl}}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Style>
</xcdg:UserControl.Resources>
...
Malheureusement ce n'est pas ... ou je n'ai pas pu savoir comment. – CodeWeasel