This documentation is archived and is not being maintained.

InkEdit.Recognition Event

Occurs when the InkEdit control gets recognition results.

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

public event InkEditRecognitionEventHandler Recognition

The event handler receives an argument of type InkEditRecognitionEventArgs that contains data about this event.

When you create an InkEditRecognitionEventHandler delegate, you identify the method that handles the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate.

The InkEdit control gets recognition results in one of two ways:

  • Manually, from a call to the InkEdit.Recognize method.

  • Automatically, after the recognition timeout fires.

In this example, the Recognition event is used to persist the RecognitionResult object. First, the RecognitionResult object is attached to the associated Strokes collection by calling the SetResultOnStrokes method. Then the Strokes are added to the CustomStrokes property of the associated Ink object.

private void mInkEdit_Recognition(object sender, InkEditRecognitionEventArgs e)
    RecognitionResult R = e.RecognitionResult;
    // add these strokes to custom strokes collection 
    // using R.Strokes[0].Id as the name
    R.Strokes.Ink.CustomStrokes.Add(R.Strokes[0].Id.ToString(), R.Strokes);

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