Could you be a little more specific? If you're successfully dragging an image, you obviously have a sense of how to program with events. Are you running into a specific issue that won't work if you click the image before or after dragging?
Click events do not have a duration. I think you may be wanting to differentiate between a mouse down (for dragging) and a click (mouse down/mouse up). If so, listen for the mouse up event, and then apply some logic to do your zoom there, if the user is not panning.
Ok, i'm using the mouse down event to set a bool to true. The program checks this value and if its true it pans the image when the user moves the mouse. on mouse up i set the bool to false. but now i want to make it so as well as that if the user does a a quick single click i.e not holding the mouse button down, it zooms in. I have added an event on mouse click, but this fires no matter how long the mouse is held down. So if a user clicks and holds the mouse to pan when they let go it zooms in.
I wondered if there is a simple way of doing this or would i have to user a timer or something to measure how long they have held the mouse down? ....actually i've just thought, i should check where the mouse is moved, if its moved sinze mouse up then don't zoom. Ok i think i have answered this myself. Cheers anyway.
The mouse up & mouse click should not be firing until you release the mouse button.
What are you clicking on, an Image Control?