Partager via


InkAnalyzerBase.FindLeafNodes, méthode

Mise à jour : November 2007

Retourne tous les nœuds terminaux, qui sont les objets ContextNodeBase ne possédant pas de nœuds enfants.

Espace de noms :  System.Windows.Ink.AnalysisCore
Assembly :  IACore (dans IACore.dll)

Syntaxe

'Déclaration
Public Function FindLeafNodes As ContextNodeBaseCollection
'Utilisation
Dim instance As InkAnalyzerBase
Dim returnValue As ContextNodeBaseCollection

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

Valeur de retour

Type : System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection
ContextNodeBaseCollection qui contient tous les nœuds terminaux.

Exemples

L'exemple suivant effectue une boucle sur tous les nœuds terminaux d'un InkAnalyzerBase, theInkAnalyzerBase, et recherche celui dont la limite inférieure est la plus basse.

' Find the leaf context node that has the lowest bottom bound.
' In the ink coordinates system a higher value is physically lower.
Dim lowest As Integer = Integer.MinValue
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 leaf context node that has the lowest bottom bound.
// In the ink coordinates system a higher value is physically lower.
int lowest = int.MinValue;
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];
    }
}

Plateformes

Windows Vista, Windows XP SP2, Windows Server 2003

Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Informations de version

.NET Framework

Pris en charge dans : 3.0

Voir aussi

Référence

InkAnalyzerBase, classe

Membres InkAnalyzerBase

System.Windows.Ink.AnalysisCore, espace de noms

InkAnalyzerBase.FindInkLeafNodes

InkAnalyzerBase.FindNode

InkAnalyzerBase.FindNodes

InkAnalyzerBase.FindNodesOfType