SystemGesture Enumeration

Defines the available system gestures.

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

public enum SystemGesture
public enum SystemGesture
public enum SystemGesture
<object property="EnumerationValue" .../>

 Member nameDescription
DragMaps to a left drag on a mouse. 
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. 
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. 
NoneNo system gesture. 
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. 
RightTapMaps to a right-click on a mouse. This can be used to show a shortcut menu. 
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. 

When the operating system recognizes system gestures, the StylusSystemGesture event occurs. Many of these 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.

void inkCanvas1_StylusSystemGesture(object sender, StylusSystemGestureEventArgs e)
    this.Title = e.SystemGesture.ToString();
    switch (e.SystemGesture)
        case SystemGesture.RightTap:
            // Do something.

        case SystemGesture.Tap:
            // Do something else.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions