Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GestureRecognitionResult Class
Collapse the table of content
Expand the table of content

GestureRecognitionResult Class

Contains information about an ink gesture.

Namespace: System.Windows.Ink
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public class GestureRecognitionResult
public class GestureRecognitionResult
public class GestureRecognitionResult
You cannot use this managed class in XAML.

A GestureRecognitionResult contains an ApplicationGesture and the level of likeliness that the GestureRecognizer correctly identified the gesture.

Use the RecognitionConfidence property to determine the level of likeliness that the GestureRecognizer correctly identified the gesture.

The following example demonstrates how to identify a gesture on an InkCanvas. This example assumes that there is an InkCanvas called inkCanvas1 and that its Gesture event has been connected to the event handler in the code.

void inkCanvas1_Gesture(object sender, InkCanvasGestureEventArgs e)
{
    ReadOnlyCollection<GestureRecognitionResult> gestureResults = 
        e.GetGestureRecognitionResults();

    // Check the first recognition result for a gesture.
    if (gestureResults[0].RecognitionConfidence == 
        RecognitionConfidence.Strong)
    {
        switch (gestureResults[0].ApplicationGesture)
        {
            case ApplicationGesture.Down:
                // Do something.
                break;
            case ApplicationGesture.ArrowDown:
                // Do something.
                break;
            case ApplicationGesture.Circle:
                // Do something.
                break;
        }

    }
}

System.Object
  System.Windows.Ink.GestureRecognitionResult

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft