Reputation: 923
I am working on Silverlight application and I want to make Image mousedouble click event,but there is no inbuilt mousedouble click in image control so I can do this..
Thanks...!!
Upvotes: 0
Views: 878
Reputation: 4585
The key to accomplishing this is to check for two things:
Try this http://www.michaelsnow.com/2010/05/10/silverlight-tip-of-the-day-17-double-click/
Regards.
Upvotes: 4
Reputation: 137148
The simplest way is to use a timer.
In the click event handler you have the following cases:
No timer. This is the first click, so start the timer and store the cursor location if necessary.
Timer running. This is potentially the second click. If the cursor hasn't moved then perform the single click action. Stop the timer.
The timer should stop itself after the double click interval (500 ms say) has expired.
Upvotes: 0