SystemGesture SystemGesture SystemGesture SystemGesture Enum

Definition

Defines the available system gestures.

public enum class SystemGesture
public enum SystemGesture
type SystemGesture = 
Public Enum SystemGesture
Inheritance
SystemGestureSystemGestureSystemGestureSystemGesture

Fields

Drag Drag Drag Drag 19

Maps to a left drag on a mouse.

Flick Flick Flick Flick 31

Occurs 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.

HoldEnter HoldEnter HoldEnter HoldEnter 21

Indicates that press and hold has occurred.

HoldLeave HoldLeave HoldLeave HoldLeave 22

Not implemented.

HoverEnter HoverEnter HoverEnter HoverEnter 23

Maps to a mouse hover. This can be used to show ToolTip rollover effects, or other mouse hover behaviors.

HoverLeave HoverLeave HoverLeave HoverLeave 24

Maps to a mouse leaving a hover. This can be used to end ToolTip rollover effects or other mouse hover behaviors.

None None None None 0

No system gesture.

RightDrag RightDrag RightDrag RightDrag 20

Maps 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.

RightTap RightTap RightTap RightTap 18

Maps to a right-click on a mouse. This can be used to show a shortcut menu.

Tap Tap Tap Tap 16

Maps 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.

TwoFingerTap TwoFingerTap TwoFingerTap TwoFingerTap 4352

Maps to a double-click of a mouse.

Examples

The following example determines which type of system gesture that raised the Tap 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.
            break;

        case SystemGesture.Tap:
            // Do something else.
            break;
    }
}
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

Remarks

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.

Applies to