In my WPF application , I am using ListView GridView, and I implemented a functionality that is associated to mouse double click.
Is there a way, or a control that distinguish between the mouse double click and mouse click?
I used a button, and implemented an event for mousedoubleclick, but the click event is still triggering
Thanks for help
Best Answer
Handling the double click event for controls that present the
MouseDoubleClick
event is no trick. Handling double click for other controls involves inspecting theClickCount
property of theMouseButtonEventArgs
.So, for instance, your XAML might look something like this:
... and your code behind like this:
Here's a page that provides a somewhat more detailed example.