Compartilhar via


GestureRecognizer.SetEnabledGestures Método

Definição

Define os gestos do aplicativo que o GestureRecognizer reconhece.

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))

Parâmetros

applicationGestures
IEnumerable<ApplicationGesture>

Uma matriz do tipo ApplicationGesture que especifica os gestos de aplicativo que você deseja que o GestureRecognizer reconheça.

Exemplos

O exemplo a seguir demonstra como criar um GestureRecognizer que reconhece apenas os Downgestos , Righte 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)

Aplica-se a