Freigeben über


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 ContextNodeCollection FindLeafNodes ()
public function FindLeafNodes () : ContextNodeCollection
Not applicable.

Return Value

A ContextNodeCollection that contains all the leaf nodes.

Example

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 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
Microsoft.Ink Namespace
Microsoft.Ink.InkAnalyzer.FindInkLeafNodes
InkAnalyzer.FindNode
Microsoft.Ink.InkAnalyzer.FindNodes
Microsoft.Ink.InkAnalyzer.FindNodesOfType