2
votes

I am using a dependency property to show a window, on double click of an item.

not sure whether it is a specific bug with WPF or I am doing something wrong.

If I double click even on the scroll bar or on the column headers.It triggers the double click command.

have tried a solution at ths link

WPF ListView ScrollViewer Double-Click Event

but as i am implementing MVVM pattern, there is no code behind, and if i try to handle it on code behind, it triggers the debug point but thats of no use.

If any body has a solution for ths, do put up here.

2
Could you post your dependency property code and sample of how's its referenced in the XAML?Jerod Houghtelling

2 Answers

3
votes
0
votes

Have you tried putting the double-click behaviour on the individual items and having the double-click logic handled in the DataTemplate/ControlTemplate instead of the ListView? That way, it should only trigger if you actually hit an item... thus exempting the empty area (if the ListView is smaller than the Window) and ScrollBars, borders etc.