SystemGesture 枚举

定义

定义可用的系统笔势。Defines the available system gestures.

public enum class SystemGesture
public enum SystemGesture
type SystemGesture = 
Public Enum SystemGesture
继承
SystemGesture

字段

Drag 19

映射为向左拖动鼠标。Maps to a left drag on a mouse.

Flick 31

使用会转换为特定命令的短、快笔画时引发。Occurs with a short, quick stroke that translates into a specific command. 笔画执行的操作是在系统级设置的。The action taken by a flick is set system-wide. 应用程序可以侦听 Flick,并通过将 ApplicationCommands 事件中的 Handled 属性设置为 true,来阻止其成为标准的 StylusSystemGesture 之一。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. 只有 Windows Vista 支持笔势。Only Windows Vista supports flicks.

HoldEnter 21

指示发生按住操作。Indicates that press and hold has occurred.

HoldLeave 22

未实现。Not implemented.

HoverEnter 23

映射为鼠标悬停。Maps to a mouse hover. 这可用于显示工具提示翻转效果,或其他鼠标悬停行为。This can be used to show ToolTip rollover effects, or other mouse hover behaviors.

HoverLeave 24

映射为鼠标离开悬停。Maps to a mouse leaving a hover. 这可用于关闭工具提示翻转效果,或其他鼠标悬停行为。This can be used to end ToolTip rollover effects or other mouse hover behaviors.

None 0

无系统笔势。No system gesture.

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 18

映射为鼠标右击。Maps to a right-click on a mouse. 可用于显示快捷菜单。This can be used to show a shortcut menu.

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 4352

映射为鼠标双击。Maps to a double-click of a mouse.

示例

下面的示例确定哪个类型的系统手势引发了SystemGesture事件。The following example determines which type of system gesture raised the SystemGesture event. 此示例假定存在一个InkCanvasinkcanvas1为的, 并SystemGesture连接到以下事件处理程序。This example assumes that there is an InkCanvas called inkcanvas1, and that SystemGesture is connected to the following event handler.

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

注解

当操作系统识别到系统手势时, 将StylusSystemGesture发生事件。When the operating system recognizes system gestures, the StylusSystemGesture event occurs. 许多手势都映射到传统的鼠标事件。Many of the gestures map to traditional mouse events. 例如, Tap系统笔势会模拟鼠标左键的一次单击。For example, the Tap system gesture mimics a single left-click on a mouse.

适用于