Sdílet prostřednictvím


InkAnalyzer.FindInkLeafNodes Method (StrokeCollection)

Returns a ContextNodeCollection containing ink leaf nodes that contain certain 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 function FindInkLeafNodes(
    strokes : StrokeCollection
) : ContextNodeCollection

Parameters

Return Value

Type: System.Windows.Ink.ContextNodeCollection
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 nulla 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.

Examples

The following example calls FindInkLeafNodes to find the ink leaf nodes in an InkAnalyzer (named theInkAnalyzer) containing strokes that match those in the StrokeCollection (selectedStrokes). It then changes the color of the matching strokes 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 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

FindInkLeafNodes Overload

System.Windows.Ink Namespace

InkAnalyzer.FindLeafNodes

InkAnalyzer.FindNode

InkAnalyzer.FindNodes

InkAnalyzer.FindNodesOfType