Sdílet prostřednictvím


InkAnalyzerBase.FindInkLeafNodes Method

Returns all of the ink leaf nodes, which are the ContextNodeBase objects that contain stroke data.

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public Function FindInkLeafNodes As ContextNodeBaseCollection
'Usage
Dim instance As InkAnalyzerBase 
Dim returnValue As ContextNodeBaseCollection 

returnValue = instance.FindInkLeafNodes()
public ContextNodeBaseCollection FindInkLeafNodes()
public:
ContextNodeBaseCollection^ FindInkLeafNodes()
public function FindInkLeafNodes() : ContextNodeBaseCollection

Return Value

Type: System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection
All of the ink leaf nodes, which are the ContextNodeBase objects that contain stroke data.

Remarks

Examples of ink leaf nodes are nodes with a Type property value of InkWord, InkDrawing, and InkBullet.

Leaf nodes do not contain child nodes.

Examples

The following example loops through all the ink leaf nodes of an InkAnalyzerBase, theInkAnalyzerBase, and finds the one with the lowest lower bound.

' Find the ink leaf context node that has the lowest bottom bound. 
Dim lowest As Integer = Integer.MaxValue
Dim lowestNode As System.Windows.Ink.AnalysisCore.ContextNodeBase = Nothing 

Dim leafNode As System.Windows.Ink.AnalysisCore.ContextNodeBase
For Each leafNode In theInkAnalyzerBase.FindInkLeafNodes()
    ' Find lowest node. Note, AnalysisRegionBase.GetBounds() returns an 
    ' array containing the left, top, right, and bottom bounds in order. 
    If leafNode.Location.GetBounds()(3) > lowest Then
        lowestNode = leafNode
        lowest = leafNode.Location.GetBounds()(3)
    End If 
Next leafNode
// Find the ink leaf context node that has the lowest bottom bound. 
int lowest = int.MaxValue;
System.Windows.Ink.AnalysisCore.ContextNodeBase lowestNode = null;
foreach (System.Windows.Ink.AnalysisCore.ContextNodeBase leafNode
    in theInkAnalyzerBase.FindInkLeafNodes())
{
    // Find lowest node. Note, AnalysisRegionBase.GetBounds() returns an 
    // array containing the left, top, right, and bottom bounds in order. 
    if (leafNode.Location.GetBounds()[3] > lowest)
    {
        lowestNode = leafNode;
        lowest = leafNode.Location.GetBounds()[3];
    }
}

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

InkAnalyzerBase Class

InkAnalyzerBase Members

FindInkLeafNodes Overload

System.Windows.Ink.AnalysisCore Namespace

InkAnalyzerBase.FindLeafNodes

InkAnalyzerBase.FindNode

InkAnalyzerBase.FindNodes

InkAnalyzerBase.FindNodesOfType