I have a WPF ListView that opens a certain window when double clicked on a certain item inside the list view, but I have a problem. When I double click the GridViewColumn, that also opens up a certain window.
Is there a way to detect if the sender is a gridviewColumn or a listView item?
Thanks
C# – WPF ListView GridViewColumn Double Click
clistviewxaml
Related Topic
- C# – LINQ’s Distinct() on a particular property
- Android – How to lazy load images in ListView in Android
- C# – How to remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning
- Android – Background ListView becomes black when scrolling
- Android – How to implement Android Pull-to-Refresh
- Android ListView with different layouts for each row
- C# – Try-catch speeding up the code
- Scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found
Best Answer
I assume you're handling the
MouseDoubleClick
event of theListView
? Instead, you should handle that event on theListViewItem
, not theListView
itself. You can do that easily by setting the event handler in theListView
'sItemContainerStyle
: