Stopbyte

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

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.

2 Likes

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

1 Like