Bonjour

Je cherche a savoir comment je pourrais gérer un MouseBinding sur les Items de ma ListView

Pour info, mes éléments de ma ListView sont un GridView.

pour le moment mon code est celui-ci
Code xaml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
<ListView.ItemsPanel>
    <ItemsPanelTemplate>
        <StackPanel>
            <StackPanel.InputBindings>
                <MouseBinding MouseAction="LeftDoubleClick" Command="{StaticResource maCommand}" />
            </StackPanel.InputBindings>
        </StackPanel>
    </ItemsPanelTemplate>
</ListView.ItemsPanel>

Attention, je ne cherche pas gèrer cet évènement dans ma ListView. Je ne veux pas que le doubleClick fonctionne quand on le fait dans un ColumnHeader.
Donc pas de ce code (en plus j'ai déjà essayer et ça fonctionne pas non plus :p)
Code xaml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
<ListView.InputBindings>
    <MouseBinding MouseAction="LeftDoubleClick" Command="{StaticResource maCommand}" />
</ListView.InputBindings>

à côté de ce code, j'ai un KeyBinding qui lui fonctionne
Code xaml : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
<PasswordBox.InputBindings>
    <KeyBinding Key="Enter" Command="{StaticResource maCommand}" />
</PasswordBox.InputBindings>
Vous noterez que la Command utiliser est la même.

Merci pour votre aide.