Share via


InkAnalyzer.CreateCustomRecognizer Method

Creates a new CustomRecognizerNode for the analyzer.

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

Syntax

'Declaration
Public Function CreateCustomRecognizer ( _
    inkRecognizerId As Guid _
) As CustomRecognizerNode
'Usage
Dim instance As InkAnalyzer 
Dim inkRecognizerId As Guid 
Dim returnValue As CustomRecognizerNode 

returnValue = instance.CreateCustomRecognizer(inkRecognizerId)
public CustomRecognizerNode CreateCustomRecognizer(
    Guid inkRecognizerId
)
public:
CustomRecognizerNode^ CreateCustomRecognizer(
    Guid inkRecognizerId
)
public function CreateCustomRecognizer(
    inkRecognizerId : Guid
) : CustomRecognizerNode

Parameters

  • inkRecognizerId
    Type: System.Guid

    The globally unique identifier (GUID) of the InkRecognizer for which to create a node.

Return Value

Type: Microsoft.Ink.CustomRecognizerNode
The new CustomRecognizerNode.

Remarks

The CustomRecognizerNode object is created as a direct child of the RootNode.

Examples

The following example takes the System.Guid for a custom recognizer, customRecognizerId, and creates a CustomRecognizerNode with it for an InkAnalyzer, theInkAnalyzer. Strokes are then added from a Strokes collection, 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 Microsoft.Ink.AnalysisStatus = theInkAnalyzer.Analyze()
theResultsTextBox.Text = customRecognizer.GetRecognizedString()
CustomRecognizerNode customRecognizer = 
    theInkAnalyzer.CreateCustomRecognizer(customRecognizerId);
theInkAnalyzer.AddStrokesToCustomRecognizer(strokesForCustomAnalysis, customRecognizer);

Microsoft.Ink.AnalysisStatus theStatus = theInkAnalyzer.Analyze();
theResultsTextBox.Text = customRecognizer.GetRecognizedString();

Platforms

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.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class

InkAnalyzer Members

Microsoft.Ink Namespace

Microsoft.Ink.CustomRecognizerNode

Microsoft.Ink.InkRecognizer

InkAnalyzer.GetInkRecognizersByPriority