Gesture.PressAndHold Method (UITestControl, Point)

Perform a press and hold gesture which is mainly associated with activating a tooltip or a context menu.

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

Syntax

'Declaration
Public Shared Sub PressAndHold ( _
    control As UITestControl, _
    relativeCoordinates As Point _
)
public static void PressAndHold(
    UITestControl control,
    Point relativeCoordinates
)
public:
static void PressAndHold(
    UITestControl^ control, 
    Point relativeCoordinates
)
static member PressAndHold : 
        control:UITestControl * 
        relativeCoordinates:Point -> unit
public static function PressAndHold(
    control : UITestControl, 
    relativeCoordinates : Point
)

Parameters

  • relativeCoordinates
    Type: Point

    A point relative to the control coordinates, at which the press and hold gesture will be performed.

Remarks

Playback of a press and hold gesture depends on screen resolution. If the resolution changes, the parameters may have to be changed.

.NET Framework Security

See Also

Reference

Gesture Class

PressAndHold Overload

Microsoft.VisualStudio.TestTools.UITesting Namespace