Share via


InkAnalyzer.FindNodesOfType Method (Guid, StrokeCollection)

Returns a ContextNodeCollection that contains ContextNode objects of a specified type, namely, the strokes in the specified StrokeCollection.

Namespace:  System.Windows.Ink
Assembly:  IAWinFX (in IAWinFX.dll)

Syntax

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

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

Parameters

Return Value

Type: System.Windows.Ink.ContextNodeCollection
A ContextNodeCollection containing the ContextNode objects of the type used to store the strokes in the strokes collection.

Remarks

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

Examples

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

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

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

See Also

Reference

InkAnalyzer Class

InkAnalyzer Members

FindNodesOfType Overload

System.Windows.Ink Namespace

InkAnalyzer.FindInkLeafNodes

InkAnalyzer.FindLeafNodes

InkAnalyzer.FindNode

InkAnalyzer.FindNodes