I learnt about double clicking a ListViewItem

I had a problem where double clicking on the listview in WPF was always launching an action even if it was not on a selected item or even on the header.

Found this article which helped me out.


I tweaked it slightly to pass an Action to execute so I can use it anywhere.