Share via


InkAnalyzer.FindNodesOfType Method (Guid, StrokeCollection)

Returns a ContextNodeCollection that contains the ContextNode objects of the specified type that contain any of the strokes in the specified StrokeCollection collection.

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 ContextNodeCollection FindNodesOfType (
    Guid type, 
    StrokeCollection strokes
)
public function FindNodesOfType (
    type : Guid, 
    strokes : StrokeCollection
) : ContextNodeCollection
Not applicable.

Parameters

  • type
  • strokes

Return Value

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 references a stroke in the strokes collection, this method includes that node in the return value.

Example

The following example finds all the 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 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
System.Windows.Ink.InkAnalyzer.FindInkLeafNodes
InkAnalyzer.FindLeafNodes
InkAnalyzer.FindNode
System.Windows.Ink.InkAnalyzer.FindNodes