Oops, I have a lot of questions that can't find answers to them in Google. Everybody is just using codes, and nobody explains their purposes. What does Mouse.Captured
mean? And What does Mouse.Capture()
do? And (sorry the last one) when LostMouseCapture
occurs?
Basically, if you call Mouse.Capture
and pass in a input element, that input element (control) will always receive the mouse events, even if the mouse is outside of the bounds of the control.
The documentation is clear:
When an element captures the mouse, it receives mouse input whether or not the cursor is within its borders.
Mouse.Captured
just lets you see if an input element has the mouse captured, and LostMouseCapture
occurs when the capturing stops.