I'm using an approach different from those that were already suggested.
I only have a handful of ListView controls (two or three) so I can do the following.
ListViewItem listViewItem = e.OriginalSource as ListViewItem;
if (listViewItem == null)
{
...
}
else
{
if (firstListView.ItemContainerGenerator.IndexFromContainer(listViewItem) >= 0)
{
...
}
else if (secondListView.ItemContainerGenerator.IndexFromContainer(listViewItem) >= 0)
{
...
}
}
This could be used with a foreach loop but if there are hundreds of ListView controls to iterate through then looking up the parent ListView of the ListViewItem is probably more efficient (as most of the other answers suggest). However I think my solution is cleaner (a bit). Hope it helps someone!