StartDragging Method (UITestControl, Point, MouseButtons, ModifierKeys)

Mouse.StartDragging Method (UITestControl, Point, MouseButtons, ModifierKeys)

 

Starts dragging the mouse while holding down the specified mouse buttons and the specified keys from the specified point that is relative to the specified control or from an absolute control, if control is null.

Namespace:   Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

public static void StartDragging(
	UITestControl control,
	Point relativeCoordinate,
	MouseButtons button,
	ModifierKeys modifierKeys
)

Parameters

control
Type: Microsoft.VisualStudio.TestTools.UITesting.UITestControl

UITestControl from which to start dragging.

relativeCoordinate
Type: System.Drawing.Point

Co-ordinates that are relative to the control to start dragging. If control is null, the relativeCoordinate specifies an absolute coordinate.

button
Type: System.Windows.Forms.MouseButtons

MouseButtons to be pressed while dragging.

modifierKeys
Type: System.Windows.Input.ModifierKeys

ModifierKeys to be pressed while dragging.

Return to top
Show:
© 2016 Microsoft