How to handle a WPF ListViewItem Mouse Double Click Event in XAML from code behind C#?

csharp

(Yay) #1

How can i handle a WPF ListViewItem MouseDoubleClick Event for every item in the ListView.

The items are dynamically generated through databinding so there is no way i can attach an event handler to every ListViewItem once added.

Is there any way to do that?

Regards.


(Sine) #2

You may use an EventSetter in the ItemContainerStyle for the ListView, that should do it.