GestureRecognizer.SetEnabledGestures 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定 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 只辨識 、 Right 和 ScratchOut 手勢的 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)