語言

GestureRecognizer.SetEnabledGestures 方法

定義

設定應用程式 GestureRecognizer 能辨識的手勢。

public:
 void SetEnabledGestures(System::Collections::Generic::IEnumerable<System::Windows::Ink::ApplicationGesture> ^ applicationGestures);
public void SetEnabledGestures(System.Collections.Generic.IEnumerable<System.Windows.Ink.ApplicationGesture> applicationGestures);
member this.SetEnabledGestures : seq<System.Windows.Ink.ApplicationGesture> -> unit
Public Sub SetEnabledGestures (applicationGestures As IEnumerable(Of ApplicationGesture))

參數

applicationGestures
IEnumerable<ApplicationGesture>

一個類型陣列 ApplicationGesture ,用來指定你想要 GestureRecognizer 辨識的應用程式手勢。

範例

以下範例示範如何建立 GestureRecognizer 只 Down識別 、 Right及 ScratchOut 手勢的 。

ApplicationGesture[] gestures = {ApplicationGesture.Down,
    ApplicationGesture.Right, ApplicationGesture.ScratchOut};

GestureRecognizer recognizer = new GestureRecognizer();

recognizer.SetEnabledGestures(gestures);
' Declare and initialize an array of application gestures.
Dim gestures As ApplicationGesture() = _
    {ApplicationGesture.Down, _
     ApplicationGesture.Right, _
     ApplicationGesture.Scratchout}

Dim recognizer As New GestureRecognizer()

recognizer.SetEnabledGestures(gestures)

適用於