Share via


InkAnalyzer.AddStrokeToCustomRecognizer Method

Adds a stroke to a custom recognizer node.

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

Syntax

'Declaration
Public Function AddStrokeToCustomRecognizer ( _
    stroke As Stroke, _
    customRecognizer As CustomRecognizerNode _
) As ContextNode
'Usage
Dim instance As InkAnalyzer 
Dim stroke As Stroke 
Dim customRecognizer As CustomRecognizerNode 
Dim returnValue As ContextNode 

returnValue = instance.AddStrokeToCustomRecognizer(stroke, _
    customRecognizer)
public ContextNode AddStrokeToCustomRecognizer(
    Stroke stroke,
    CustomRecognizerNode customRecognizer
)
public:
ContextNode^ AddStrokeToCustomRecognizer(
    Stroke^ stroke, 
    CustomRecognizerNode^ customRecognizer
)
public function AddStrokeToCustomRecognizer(
    stroke : Stroke, 
    customRecognizer : CustomRecognizerNode
) : ContextNode

Parameters

Return Value

Type: Microsoft.Ink.ContextNode
The context node to which the InkAnalyzer added the stroke.

Remarks

The InkAnalyzer adds the Stroke to an UnclassifiedInkNode in SubNodes collection of customRecognizer. If no such UnclassifiedInkNode exists, the InkAnalyzer creates a new UnclassifiedInkNode under customRecognizer and adds the stroke to the new UnclassifiedInkNode.

This method expands the DirtyRegion to the union of the region's current value and the bounding box of the added stroke.

If the stroke is already attached to the InkAnalyzer, the InkAnalyzer throws an exception.

If customRecognizer is not a CustomRecognizerNode, the InkAnalyzer throws an exception.

Examples

This example shows an excerpt from an event handler for the Stroke event of an InkCollector object. The stroke is added to the CustomRecognizerNode, theCustomRecognizerNode.

' Add the stroke to the specified CustomRecognizerNode. 
Me.theInkAnalyzer.AddStrokeToCustomRecognizer( _
    e.Stroke, Me.theCustomRecognizerNode)
// Add the stroke to the specified CustomRecognizerNode. 
this.theInkAnalyzer.AddStrokeToCustomRecognizer(
    e.Stroke, this.theCustomRecognizerNode);

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