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 ();
}
/** @property */
public ContextNode get_RootNode ()
public function get RootNode () : ContextNode
Not applicable.
Property Value
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.
Example
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 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
InkAnalyzer Class
InkAnalyzer Members
Microsoft.Ink Namespace