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


(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?


(Sine) #2

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