Skip to main content
Home Forums Silverlight Programming Programming with JavaScript Locking mouse within a canvas
5 replies. Latest Post by amitbisla on October 24, 2007.
(0)
amitbisla
Member
4 points
3 Posts
10-16-2007 6:48 AM |
Hi,
I would like to know how I can restrict the mouse within a canvas if left button is pressed?
Actually, this is part of a drag and drop operation, I don't want the mouse to move out of the outermost canvas if the drag operation is on.
Best Regards,
Amit
Dave Bri...
681 points
229 Posts
10-16-2007 10:59 AM |
No easy way to do this that I can think of. Can you just "drop" when you get to the boundary instead?
=> Dave
10-19-2007 8:24 AM |
Hi Dave,
Thanks for the suggestion.
Regards,
~Amit
Adam Kinney
94 points
19 Posts
10-19-2007 1:21 PM |
Using the captureMouse method may be useful for you as well: http://msdn2.microsoft.com/en-us/library/bb412388.aspx#Implementing_Drag_and_Drop
10-19-2007 2:20 PM |
Looks like a very usefull method!
10-24-2007 3:24 AM |
In that case, if I move out of plugin with the left button down and enter the plugin again, it behaves in some unexpected manner.