GestureRecognizer Constructor (IEnumerable<ApplicationGesture>)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes a new instance of the GestureRecognizer class.

Namespace:   System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)

public GestureRecognizer(
	IEnumerable<ApplicationGesture> enabledApplicationGestures


Type: System.Collections.Generic.IEnumerable<ApplicationGesture>

An array of type ApplicationGesture that specifies the application gestures the GestureRecognizer will recognize.

Use the GestureRecognizer constructor to create a GestureRecognizer that recognizes a subset of the application gestures.

The following example demonstrates how to create a GestureRecognizer that recognizes only the Down, Right, and ScratchOut gestures.

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

GestureRecognizer recognizer = new GestureRecognizer(gestures);

.NET Framework
Available since 3.0
Return to top