CustomRecognizerNode Class
Represents a ContextNode for a single recognition operation. All strokes and nodes stored under a CustomRecognizerNode object are recognized in an independent recognition operation and are not analyzed by the InkAnalyzer.
Assembly: IAWinFX (in IAWinFX.dll)
A CustomRecognizerNode object may contain any type of ContextNode except RootNode. A CustomRecognizerNode object must be the direct child of the RootNode.
The simplest way to create a custom recognizer is to use InkAnalyzer.CreateCustomRecognizer to create the recognizer and to use InkAnalyzerAddStrokesToCustomRecognizer(StrokeCollection, ContextNode) to assign strokes to it. If any stroke that you add is already assigned to any node in the InkAnalyzer context tree, including an UnclassifiedInkNode, an ArgumentException is thrown. To avoid this, use InkAnalyzer.RemoveStroke or InkAnalyzer.RemoveStrokes to remove those strokes from the InkAnalyzer context tree before adding them to the custom recognizer.
The following example takes a Guid for a custom recognizer named customRecognizerId, and creates a CustomRecognizerNode with it for an InkAnalyzer named theInkAnalyzer. Strokes are then added from a StrokeCollection, strokesForCustomAnalysis. Then Analyze is called and the recognized string is put into a TextBox, theResultsTextBox.
Dim customRecognizer As CustomRecognizerNode = _ theInkAnalyzer.CreateCustomRecognizer(customRecognizerId) theInkAnalyzer.AddStrokesToCustomRecognizer(strokesForCustomAnalysis, customRecognizer) Dim theStatus As AnalysisStatus = theInkAnalyzer.Analyze() theResultsTextBox.Text = customRecognizer.GetRecognizedString()
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
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.