Version

CaptureMouseForElement Method

Captures the mouse for the passed in element.
Syntax
'Declaration
 
Public Sub CaptureMouseForElement( _
   ByVal element As UIElement _
) 
public void CaptureMouseForElement( 
   UIElement element
)

Parameters

element
The element to capture the mouse for.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionIs thrown if the passed in element is null.
System.ArgumentExceptionIs thrown if the passed in element isn't a descendant of this ControlUIElementBase derived element.
Remarks

During mouse capture all mouse messages will be routed to the element.

In other words, the elements UIElement.OnMouseMove and UIElement.OnMouseUp virtual methods will be called.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also