This documentation is archived and is not being maintained.

RecognitionResult Class

Represents the result of the recognition. The results of recognizing handwritten ink are returned in a RecognitionResult object.

Namespace:  Microsoft.Ink
Assembly:  Microsoft.Ink (in Microsoft.Ink.dll)

[PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")]
public class RecognitionResult

RecognitionAlternate objects, or alternate, are created from the result. The best, or top, alternate is the one that is used by the default in the result. However, you can use the methods of the RecognitionResult object to specify which alternates to use in the result.

System performance can suffer if recognition results are automatically assigned to every collection of stroke. Therefore, by default, results are not attached to a Strokes collection. You must call the SetResultOnStrokes method to assign results to a Strokes collection.

The only way to persist recognition results is to call SetResultOnStrokes and then add this Strokes collection to the CustomStrokes collection on the Ink object.

Not all recognizers set the TopConfidence property. When an application attempts to access a property that is not set by the recognizer, an argument exception is thrown.


The various handwriting recognizers shipped from Microsoft in both recognizers of Latin script and recognizers of East Asian languages can sometimes produce the Unicode value 0xFFFF as the recognition result. This occurs when the recognizer is unable to match a piece of ink with any valid character. The 0xFFFF code point is valid UCS-2, but not allowed in UTF-8. An application that converts recognition results to UTF-8, should replace 0xFFFF with some other code point, for example, 0xFFFD.


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 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.0