Share via


InkAnalyzer.FindLeafNodes Method

Returns all of the leaf nodes, which are the ContextNode objects that have no child nodes.

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

Syntax

'Declaration
Public Function FindLeafNodes As ContextNodeCollection
'Usage
Dim instance As InkAnalyzer 
Dim returnValue As ContextNodeCollection 

returnValue = instance.FindLeafNodes()
public ContextNodeCollection FindLeafNodes()
public:
ContextNodeCollection^ FindLeafNodes()
public function FindLeafNodes() : ContextNodeCollection

Return Value

Type: Microsoft.Ink.ContextNodeCollection
A ContextNodeCollection that contains all the leaf nodes.

Examples

The following example loops through all the leaf nodes of an InkAnalyzer, theInkAnalyzer, and adds those that extend below an integer, yValue, to an ArrayList, nodesBelowYValue.

Dim nodesBelowYValue As New ArrayList()
Dim leafNode As ContextNode
For Each leafNode In theInkAnalyzer.FindLeafNodes()
    ' Add to collection if bottom is lower than yValue 
    If leafNode.Location.GetBounds().Bottom > yValue Then
        nodesBelowYValue.Add(leafNode)
    End If 
Next leafNode
           ArrayList nodesBelowYValue = new ArrayList();
            foreach (ContextNode leafNode in theInkAnalyzer.FindLeafNodes())
            {
                // Add to collection if bottom is lower than yValue 
                if (leafNode.Location.GetBounds().Bottom > yValue)
                {
                    nodesBelowYValue.Add(leafNode);
                }
            }

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

Microsoft.Ink Namespace

InkAnalyzer.FindInkLeafNodes

InkAnalyzer.FindNode

InkAnalyzer.FindNodes

InkAnalyzer.FindNodesOfType