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

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)

适用于