Share via


InkAnalyzer.FindNodesOfType Method (Guid, Strokes)

Returns the ContextNode objects of the specified type that contain any of the strokes in the specified Strokes collection.

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

Syntax

'Declaration
Public Function FindNodesOfType ( _
    type As Guid, _
    strokes As Strokes _
) As ContextNodeCollection
'Usage
Dim instance As InkAnalyzer 
Dim type As Guid 
Dim strokes As Strokes 
Dim returnValue As ContextNodeCollection 

returnValue = instance.FindNodesOfType(type, _
    strokes)
public ContextNodeCollection FindNodesOfType(
    Guid type,
    Strokes strokes
)
public:
ContextNodeCollection^ FindNodesOfType(
    Guid type, 
    Strokes^ strokes
)
public function FindNodesOfType(
    type : Guid, 
    strokes : Strokes
) : ContextNodeCollection

Parameters

Return Value

Type: Microsoft.Ink.ContextNodeCollection
A ContextNodeCollection containing the ContextNode objects of the specified type that contain any of the strokes in strokes.

Remarks

If the node or one of its descendants reference a stroke in the strokes collection, this method includes that node in the return value.

Examples

The following example finds all the LineNode objects that contain any of the strokes in a Strokes collection, selectedStrokes, and marks them as red.

Dim selectedLines As ContextNodeCollection = _
    theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Line, selectedStrokes)
Dim line As LineNode
For Each line In selectedLines
    Dim inkStroke As Stroke
    For Each inkStroke In line.Strokes
        inkStroke.DrawingAttributes = New DrawingAttributes(Color.Red)
    Next inkStroke
Next line
           ContextNodeCollection selectedLines =
                theInkAnalyzer.FindNodesOfType(Microsoft.Ink.ContextNodeType.Line,
                selectedStrokes);
            foreach (LineNode line in selectedLines)
            {
                foreach (Stroke stroke in line.Strokes)
                    stroke.DrawingAttributes = new DrawingAttributes(Color.Red);
            }

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

FindNodesOfType Overload

Microsoft.Ink Namespace

InkAnalyzer.FindInkLeafNodes

InkAnalyzer.FindLeafNodes

InkAnalyzer.FindNode

InkAnalyzer.FindNodes