InkAnalyzerBase.FindLeafNodes-Methode
Gibt alle Freihandendknoten zurück, bei denen es sich um ContextNodeBase-Objekte handelt, die keine untergeordneten Knoten besitzen.
Namespace: System.Windows.Ink.AnalysisCore
Assembly: IACore (in IACore.dll)
Syntax
'Declaration
Public Function FindLeafNodes As ContextNodeBaseCollection
'Usage
Dim instance As InkAnalyzerBase
Dim returnValue As ContextNodeBaseCollection
returnValue = instance.FindLeafNodes()
public ContextNodeBaseCollection FindLeafNodes()
public:
ContextNodeBaseCollection^ FindLeafNodes()
public ContextNodeBaseCollection FindLeafNodes()
public function FindLeafNodes() : ContextNodeBaseCollection
Rückgabewert
Typ: System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection
Eine ContextNodeBaseCollection, die alle Endknoten enthält.
Beispiele
Im folgenden Beispiel werden alle Endknoten eines InkAnalyzerBase namens theInkAnalyzerBase durchlaufen, und es wird der Knoten mit der niedrigsten Untergrenze gesucht.
' 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];
}
}
Plattformen
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework und .NET Compact Framework unterstützen nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen für .NET Framework.
Versionsinformationen
.NET Framework
Unterstützt in: 3.0
Siehe auch
Referenz
System.Windows.Ink.AnalysisCore-Namespace