InkAnalyzerBase.FindLeafNodes 方法
傳回所有分葉節點,這些分葉節點是不包含任何子節點的 ContextNodeBase 物件。
命名空間: System.Windows.Ink.AnalysisCore
組件: IACore (在 IACore.dll 中)
語法
'宣告
Public Function FindLeafNodes As ContextNodeBaseCollection
'用途
Dim instance As InkAnalyzerBase
Dim returnValue As ContextNodeBaseCollection
returnValue = instance.FindLeafNodes()
public ContextNodeBaseCollection FindLeafNodes()
public:
ContextNodeBaseCollection^ FindLeafNodes()
public ContextNodeBaseCollection FindLeafNodes()
public function FindLeafNodes() : ContextNodeBaseCollection
傳回值
型別:System.Windows.Ink.AnalysisCore.ContextNodeBaseCollection
包含所有分葉節點的 ContextNodeBaseCollection。
範例
下列範例會對 InkAnalyzerBase (theInkAnalyzerBase) 的所有分葉節點執行迴圈,並且找出下限最低的節點。
' 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];
}
}
平台
Windows Vista, Windows XP SP2, Windows Server 2003
.NET Framework 和 .NET Compact Framework 並不支援各種平台的所有版本。如需支援平台版本的相關資訊,請參閱 .NET Framework 系統需求。
版本資訊
.NET Framework
支援版本:3.0
請參閱
參考
System.Windows.Ink.AnalysisCore 命名空間