共用方式為


GestureRecognizer 建構函式

定義

初始化 GestureRecognizer 類別的新執行個體。

多載

GestureRecognizer()

初始化 GestureRecognizer 類別的新執行個體。

GestureRecognizer(IEnumerable<ApplicationGesture>)

初始化 GestureRecognizer 類別的新執行個體。

GestureRecognizer()

初始化 GestureRecognizer 類別的新執行個體。

public:
 GestureRecognizer();
public GestureRecognizer ();
Public Sub New ()

備註

使用這個建構函式建立時,會 GestureRecognizer 辨識所有應用程式手勢。

適用於

GestureRecognizer(IEnumerable<ApplicationGesture>)

初始化 GestureRecognizer 類別的新執行個體。

public:
 GestureRecognizer(System::Collections::Generic::IEnumerable<System::Windows::Ink::ApplicationGesture> ^ enabledApplicationGestures);
public GestureRecognizer (System.Collections.Generic.IEnumerable<System.Windows.Ink.ApplicationGesture> enabledApplicationGestures);
new System.Windows.Ink.GestureRecognizer : seq<System.Windows.Ink.ApplicationGesture> -> System.Windows.Ink.GestureRecognizer
Public Sub New (enabledApplicationGestures As IEnumerable(Of ApplicationGesture))

參數

enabledApplicationGestures
IEnumerable<ApplicationGesture>

ApplicationGesture 型別的陣列,指定 GestureRecognizer 可辨識的應用程式筆勢。

範例

下列範例示範如何建立 GestureRecognizer 只辨識 DownRightScratchOut 手勢的 。

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

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

Dim recognizer As New GestureRecognizer(gestures)

備註

使用 建 GestureRecognizer 構函式建立 GestureRecognizer 可辨識應用程式手勢子集的 。

適用於