How to get the mouse button state in Silverlight outside of button press events? -


I have the following condition

I then control when the left mouse button pressed in my Silverlight app Goes a few things, while the mouse is placed below and the mouse moves, when the left button is released, I close the flag, which is asking to handler the goods and mouse movement, then do not do the stuff.

The problem is: If the user is in the control area, the left button is pushed down and the control is out of the area, then the buttons and reenters are released, the mouse leftbuttonup is never organized. And the processing continues until the user clicks the mouse.

Turning on my temporary fix was the mouse flag on the mouse levev but it is not really what I'm doing. I want to check to see the left button position of the mouse in MouseEnter event, but I do not have a way to do this.

Does anyone know that I can use the mouse button to state the events of press in Silverlight 3? Thanks,

Update

After thorough research, it does not appear that it can be found in Silverlight 2 (and maybe 3.) . If someone is aware of an alternate solution, please let me know.

What you need to do is UIElement.CaptureMouse method:

When UIElement has captured the mouse, it will continue to receive the mouse event, even if the mouse left Silverlight control.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -