Share via


InkAnalyzer.AddStrokeToCustomRecognizer Method

Adds a stroke to a custom recognizer node.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.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 ContextNode AddStrokeToCustomRecognizer (
    Stroke stroke, 
    CustomRecognizerNode customRecognizer
)
public function AddStrokeToCustomRecognizer (
    stroke : Stroke, 
    customRecognizer : CustomRecognizerNode
) : ContextNode
Not applicable.

Parameters

  • stroke
    The stroke to add to the custom recognizer node.
  • customRecognizer
    The custom recognizer node.

Return Value

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.

Example

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

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

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkAnalyzer Class
InkAnalyzer Members
System.Windows.Ink Namespace