GestureRecognizer::Recognize Method (StrokeCollection^)

 

Looks for gestures in the specified StrokeCollection.

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

public:
[SecurityCriticalAttribute]
ReadOnlyCollection<GestureRecognitionResult^>^ Recognize(
	StrokeCollection^ strokes
)

Parameters

strokes
Type: System.Windows.Ink::StrokeCollection^

The StrokeCollection to search for gestures.

Return Value

Type: System.Collections.ObjectModel::ReadOnlyCollection<GestureRecognitionResult^>^

An array of type GestureRecognitionResult that contains application gestures that the GestureRecognizer recognized.

The array returned by the Recognize method is sorted by the GestureRecognitionResult::RecognitionConfidence property. For example, Recognize may return a GestureRecognitionResult array with the following values:

Index

ApplicationGesture

RecognitionConfidence

0

Check

Strong

1

NoGesture

Intermediate

2

Curlicue

Poor

3

DoubleCurlicue

Poor

This means that the GestureRecognizer recognizes that it is very likely that the Stroke is a check mark, relatively likely that the Stroke in not a gesture, and not at all likely that the Stroke is a curlicue or a double curlicue.

System_CAPS_noteNote

The Recognize method can return an array with NoGesture at a higher RecognitionConfidence than other application gestures. This means that it is more likely that the Stroke is not a gesture, as opposed to a gesture that has a lower RecognitionConfidence.

The following example demonstrates how to determine whether a Stroke is a ScratchOut gesture.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: