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 function AddStrokeToCustomRecognizer(
stroke : Stroke,
customRecognizer : CustomRecognizerNode
) : ContextNode
Parameters
stroke
Type: System.Windows.Ink.StrokeThe stroke added to the custom recognizer node.
customRecognizer
Type: System.Windows.Ink.CustomRecognizerNodeThe custom recognizer node.
Return Value
Type: System.Windows.Ink.ContextNode
The context node to which the InkAnalyzer added the stroke.
Remarks
The InkAnalyzer adds the Stroke to an UnclassifiedInkNode in the 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 StrokeCollected event of an InkCanvas. The stroke is added to the CustomRecognizerNode, named 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 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.
Version Information
.NET Framework
Supported in: 3.0