Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gibt alle Freihandendknoten zurück, bei denen es sich um ContextNode-Objekte handelt, die Freihandstriche enthalten.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)
Syntax
'Declaration
Public Function FindInkLeafNodes As ContextNodeCollection
'Usage
Dim instance As InkAnalyzer
Dim returnValue As ContextNodeCollection
returnValue = instance.FindInkLeafNodes()
public ContextNodeCollection FindInkLeafNodes()
public:
ContextNodeCollection^ FindInkLeafNodes()
public ContextNodeCollection FindInkLeafNodes()
public function FindInkLeafNodes() : ContextNodeCollection
Rückgabewert
Typ: Microsoft.Ink.ContextNodeCollection
Alle Freihandendknoten, bei denen es sich um ContextNode-Objekte handelt, die Freihandstriche enthalten.
Hinweise
Beispiele für Freihandendknoten sind InkWordNode, InkDrawingNode und InkBulletNode.
Endknoten enthalten keine untergeordneten Knoten.
Beispiele
Im folgenden Beispiel werden alle Freihandendknoten von InkAnalyzer, theInkAnalyzer, durchlaufen. Der Knoten auf unterster Ebene wird rot hervorgehoben.
Dim lowest As Integer = Integer.MinValue
Dim lowestNode As ContextNode = Nothing
Dim leafNode As ContextNode
For Each leafNode In theInkAnalyzer.FindInkLeafNodes()
' Find lowest node
If leafNode.Location.GetBounds().Bottom > lowest Then
lowestNode = leafNode
lowest = leafNode.Location.GetBounds().Bottom
End If
' Set each stroke to black
Dim inkStroke As Stroke
For Each inkStroke In leafNode.Strokes
inkStroke.DrawingAttributes = New DrawingAttributes(Color.Black)
Next inkStroke
Next leafNode
' Set lowest stroke to red
If Not (lowestNode Is Nothing) Then
Dim inkStroke As Stroke
For Each inkStroke In lowestNode.Strokes
inkStroke.DrawingAttributes = New DrawingAttributes(Color.Red)
Next inkStroke
End If
int lowest = int.MinValue;
ContextNode lowestNode = null;
foreach (ContextNode leafNode in theInkAnalyzer.FindInkLeafNodes())
{
// Find lowest node
if (leafNode.Location.GetBounds().Bottom > lowest)
{
lowestNode = leafNode;
lowest = leafNode.Location.GetBounds().Bottom;
}
// Set each stroke to black
foreach (Stroke stroke in leafNode.Strokes)
{
stroke.DrawingAttributes = new DrawingAttributes(Color.Black);
}
}
// Set lowest stroke to red
if (lowestNode != null)
{
foreach (Stroke stroke in lowestNode.Strokes)
{
stroke.DrawingAttributes = new DrawingAttributes(Color.Red);
}
}
Plattformen
Windows Vista
.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