Condividi tramite


InkAnalyzer.FindInkLeafNodes Method (StrokeCollection)

Returns a ContextNodeCollection containing the ink leaf nodes that contain the specified strokes.

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

Syntax

'Declaration
Public Function FindInkLeafNodes ( _
    strokes As StrokeCollection _
) As ContextNodeCollection
'Usage
Dim instance As InkAnalyzer
Dim strokes As StrokeCollection
Dim returnValue As ContextNodeCollection

returnValue = instance.FindInkLeafNodes(strokes)
public ContextNodeCollection FindInkLeafNodes (
    StrokeCollection strokes
)
public:
ContextNodeCollection^ FindInkLeafNodes (
    StrokeCollection^ strokes
)
public ContextNodeCollection FindInkLeafNodes (
    StrokeCollection strokes
)
public function FindInkLeafNodes (
    strokes : StrokeCollection
) : ContextNodeCollection
Not applicable.

Parameters

  • strokes
    The strokes that the ink leaf nodes contain.

Return Value

The ink leaf nodes that contain the specified strokes.

Remarks

Examples of ink leaf nodes are InkWordNode, InkDrawingNode, and InkBulletNode.

Leaf nodes do not contain child nodes.

An exception is thrown if strokes is a null reference (Nothing in Visual Basic). If no nodes contain the strokes, an empty ContextNodeCollection is returned. Similarly, if an empty StrokeCollection collection is passed in, an empty ContextNodeCollection is returned.

Example

The following example Calls FindInkLeafNodes to find the ink leaf nodes in an InkAnalyzer, theInkAnalyzer, that contain strokes in the StrokeCollection, selectedStrokes. It then changes the color of the strokes associated with those nodes to red.

For Each node As ContextNode In theInkAnalyzer.FindInkLeafNodes(selectedStrokes)
    For Each Stroke As Stroke In node.Strokes
        Stroke.DrawingAttributes.Color = Colors.Red
    Next Stroke
Next node
foreach (ContextNode node in theInkAnalyzer.FindInkLeafNodes(selectedStrokes))
{
    foreach (Stroke stroke in node.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
InkAnalyzer.FindLeafNodes
InkAnalyzer.FindNode
System.Windows.Ink.InkAnalyzer.FindNodes
System.Windows.Ink.InkAnalyzer.FindNodesOfType