InkAnalyzer.RootNode Property
Gets the root ContextNode of the InkAnalyzer.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.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: Microsoft.Ink.ContextNode
The root ContextNode of the InkAnalyzer.
Remarks
The InkAnalyzer maintains a tree of ContextNode objects. These objects contain both 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, 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 then sends information about each node encountered to the debug output. The helper method, GetContextNodeTypeName, is not shown.
''' <summary>
''' Checks the specified ContextNode and all of its descendents.
''' </summary>
''' <param name="theContextNode">The node at which to start.</param>
''' <remarks>
''' This method writes the name of the type of each node encountered
''' to the debug output.
''' </remarks>
Private Shared Sub CheckTreeNodes(ByVal theContextNode As Microsoft.Ink.ContextNode)
' Check the node...
System.Diagnostics.Debug.WriteLine(GetContextNodeTypeName(theContextNode.Type))
System.Diagnostics.Debug.Indent()
' Check the child nodes.
Dim theContextSubnode As Microsoft.Ink.ContextNode
For Each theContextSubnode In theContextNode.SubNodes
CheckTreeNodes(theContextSubnode)
Next theContextSubnode
System.Diagnostics.Debug.Unindent()
End Sub 'CheckTreeNodes
/// <summary>
/// Checks the specified ContextNode and all of its descendents.
/// </summary>
/// <param name="theContextNode">The node at which to start.</param>
/// <remarks>
/// This method writes the name of the type of each node encountered
/// to the debug output.
/// </remarks>
private static void CheckTreeNodes(Microsoft.Ink.ContextNode theContextNode)
{
// Check the node...
System.Diagnostics.Debug.WriteLine(
GetContextNodeTypeName(theContextNode.Type));
System.Diagnostics.Debug.Indent();
// Check the child nodes.
foreach (Microsoft.Ink.ContextNode theContextSubnode
in theContextNode.SubNodes)
{
CheckTreeNodes(theContextSubnode);
}
System.Diagnostics.Debug.Unindent();
}
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
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