This documentation is archived and is not being maintained.

RecognizerContext::RecognitionWithAlternates Event

Occurs when the RecognizerContext object has generated results after calling the BackgroundRecognizeWithAlternates method.

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

 event RecognizerContextRecognitionWithAlternatesEventHandler^ RecognitionWithAlternates {
	void add (RecognizerContextRecognitionWithAlternatesEventHandler^ value);
	void remove (RecognizerContextRecognitionWithAlternatesEventHandler^ value);

The event handler receives an argument of type RecognizerContextRecognitionWithAlternatesEventArgs containing data about this event.

When you create a RecognizerContextRecognitionWithAlternatesEventHandler 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 behavior of the application programming interface (API) is unpredictable if you try to gain access to the original RecognizerContext object from the RecognitionWithAlternates event handler. Do not attempt to do this. Instead, if you need to do this, create a flag and set it in the Recognition event handler. Then you can poll that flag to determine when to change the RecognizerContext properties outside of the event handler.

In this example, each stroke made in an InkOverlay object is automatically recognized and the recognition results (including alternates) displayed.

During application startup, the RecognizerContext object is instantiated, and event handlers are assigned.

No code example is currently available or this language may not be supported.

When the Stroke event fires (in response to the user completing a stroke), the newly created stroke is added to the Strokes collection of the RecognizerContext object, and the BackgroundRecognizeWithAlternates method is called.

No code example is currently available or this language may not be supported.

When background recognition is complete, the RecognitionWithAlternates event fires. During handling of this event, the results of the recognition (including alternates) are placed in a list box.

No code example is currently available or this language may not be supported.

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