InkAnalyzer.RootNode Property
Gets the root ContextNode of the InkAnalyzer.
Namespace: System.Windows.Ink
Assembly: IAWinFX (in IAWinFX.dll)
Syntax
'Declaration
Public ReadOnly Property RootNode As ContextNode
'Usage
Dim instance As InkAnalyzer
Dim value As ContextNode
value = instance.RootNode
public ContextNode RootNode { get; }
public:
property ContextNode^ RootNode {
ContextNode^ get ();
}
public function get RootNode () : ContextNode
Property Value
Type: System.Windows.Ink.ContextNode
The root ContextNode of the InkAnalyzer.
Remarks
The InkAnalyzer maintains a tree of ContextNode objects. These objects contain: input for analysis, and the results of analysis. When strokes are initially added to the InkAnalyzer, the InkAnalyzer assigns them to an UnclassifiedInkNode. After the strokes are analyzed, the InkAnalyzer assigns them to appropriate ContextNode objects in the tree.
Examples
This example calls a helper method, CheckTreeNodes, to check all of the ContextNode objects currently maintained by the InkAnalyzer (named theInkAnalyzer).
' Use a helper function to check all the ContextNode objects in
' the analyzer's tree.
CheckTreeNodes(Me.theInkAnalyzer.RootNode)
// Use a helper function to check all the ContextNode objects in
// the analyzer's tree.
CheckTreeNodes(this.theInkAnalyzer.RootNode);
In this example, CheckTreeNodes sends information about each node encountered to the debug output.
Private Shared Sub CheckTreeNodes(ByVal theContextNode As ContextNode)
' Check the node...
System.Diagnostics.Debug.WriteLine(theContextNode.ToString())
System.Diagnostics.Debug.Indent()
' Check the child nodes.
Dim theContextSubnode As ContextNode
For Each theContextSubnode In theContextNode.SubNodes
CheckTreeNodes(theContextSubnode)
Next theContextSubnode
System.Diagnostics.Debug.Unindent()
End Sub 'CheckTreeNodes
private static void CheckTreeNodes(ContextNode theContextNode)
{
// Check the node...
System.Diagnostics.Debug.WriteLine(theContextNode.ToString());
System.Diagnostics.Debug.Indent();
// Check the child nodes.
foreach (ContextNode theContextSubnode
in theContextNode.SubNodes)
{
CheckTreeNodes(theContextSubnode);
}
System.Diagnostics.Debug.Unindent();
}
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