GestureRecognizer::Recognize Method (StrokeCollection^)
Looks for gestures in the specified StrokeCollection.
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 | ||
1 | ||
2 | ||
3 |
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.
Note |
|---|
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.
Available since 3.0
