This documentation is archived and is not being maintained.

RecognizerContext.RecognitionFlags Property

Gets or sets the flags that specify how the recognizer interprets the ink and determines the result string.

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

public RecognitionModes RecognitionFlags { get; set; }

Property Value

Type: Microsoft.Ink.RecognitionModes
A member of the RecognitionModes enumeration, which gets or sets the flags that specify how the recognizer interprets the ink and determines the result string.

The RecognitionFlags property gets or sets flags that specify things such as whether the recognizer treats all ink as a single word or whether the recognizer coerces the result based on the factoid that you specified for the context.

Setting the RecognitionFlags property succeeds only if the Strokes property is null. You must set the RecognitionFlags property before you attach a Strokes collection to the Strokes property of the RecognizerContext, or you must set the Strokes property to null and then set the RecognitionModes flags.

NoteNote:

If you use the latter method, you may need to reattach the Strokes collection to the Strokes property of the RecognizerContext.

For a list of modes that you can use, see the RecognitionModes enumeration type.

NoteNote:

You can combine modes using the bitwise OR operator.

In this example, a RecognizerContext object is instantiated, the Factoid property set to bias recognition in favor of a telephone number. The RecognitionFlags property is then set to RecognitionModes enumeration member Coerce. This forces recognition to return a telephone number.

RecognizerContext RC = new RecognizerContext();
RC.Factoid = "(!IS_TELEPHONE_LOCALNUMBER)";
RC.RecognitionFlags = RecognitionModes.Coerce;

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
Show: