We have implemented a simple InputBinding for mouse click gestures, the code is something like below:
<Image.InputBindings>
<MouseBinding MouseAction="LeftClick" Command="{Binding OpenDialogCommand}" />
<MouseBinding MouseAction="LeftDoubleClick" Command="{Binding OpenDialogCommand}" />
</Image.InputBindings>
We expected that WPF is able to recognize Left and LeftDouble gestures and do the respective command. But in practice we found that the Left Click is evaluated first and the second click of the double click is treated as another single click. Since our command is to open a dialog doing a doubleclick will quickly open and close our dialog.
Does anyone meet such thing before?
Thanks.
S.
TextBlockis actually the sequence: CLICK CLICK DOUBLECLICK. The events are also processed on Mouse DOWN, not mouse UP. I've looked around a bit and haven't yet found a simple solution for isolating these events. - cod3monk3y