SystemGesture SystemGesture SystemGesture SystemGesture Enum

定義

定義可用的系統筆勢。Defines the available system gestures.

public enum class SystemGesture
public enum SystemGesture
type SystemGesture = 
Public Enum SystemGesture
繼承
SystemGestureSystemGestureSystemGestureSystemGesture

欄位

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. 應用程式可以接聽 Flick 並避免其變成其中一個標準的 ApplicationCommands,方法將 Handled 屬性在 StylusSystemGesture 事件中設定為 true。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 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.

範例

下列範例會決定哪些類型的系統手勢引發SystemGesture事件。The following example determines which type of system gesture raised the SystemGesture event. 這個範例假設有一個InkCanvas已呼叫inkcanvas1, 且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.

適用於