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仅识别 、 RightScratchOut 手势的 Down

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 可识别应用程序手势子集的 。

适用于