Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SystemGesture Enumeration

Defines the available system gestures.

Namespace:  System.Windows.Input
Assembly:  PresentationCore (in PresentationCore.dll)

'Declaration
Public Enumeration SystemGesture
<object property="enumerationMemberName" .../>

Member nameDescription
NoneNo system gesture.
TapMaps to a left-click on a mouse. This can be used to choose a command from the menu or toolbar, take action if a command is chosen, set an insertion point, or show selection feedback.
RightTapMaps to a right-click on a mouse. This can be used to show a shortcut menu.
DragMaps to a left drag on a mouse.
RightDragMaps to a right drag on a mouse. This can be used to drag an object or selection to a different area and is followed by the appearance of the shortcut menu which provides options for moving the object.
HoldEnterIndicates that press and hold has occurred.
HoldLeaveNot implemented.
HoverEnterMaps to a mouse hover. This can be used to show ToolTip rollover effects, or other mouse hover behaviors.
HoverLeaveMaps to a mouse leaving a hover. This can be used to end ToolTip rollover effects or other mouse hover behaviors.
FlickOccurs with a short, quick stroke that translates into a specific command. The action taken by a flick is set system-wide. An application can listen for a Flick and prevent it from becoming one of the standard ApplicationCommands by setting the Handled property to true in the StylusSystemGesture event. Only Windows Vista supports flicks.
TwoFingerTapMaps to a double-click of a mouse.

When the operating system recognizes system gestures, the StylusSystemGesture event occurs. Many of the gestures map to traditional mouse events. For example, the Tap system gesture mimics a single left-click on a mouse.

The following example determines which type of system gesture that raised the SystemGesture event. This example assumes that there is a InkCanvas called inkcanvas1 and that SystemGesture is connected to the event handler below.


Private Sub inkCanvas1_StylusSystemGesture(ByVal sender As Object, ByVal e As StylusSystemGestureEventArgs)

    Me.Title = e.SystemGesture.ToString()

    Select Case e.SystemGesture
        Case SystemGesture.RightTap
            ' Do something.

        Case SystemGesture.Tap
            ' Do something else.
    End Select

End Sub 'inkCanvas1_StylusSystemGesture



.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

Show:
© 2017 Microsoft