다음을 통해 공유


InkAnalyzer.RootNode Property

Gets the root ContextNode of the InkAnalyzer.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)
XML Namespace:  https://schemas.microsoft.com/winfx/2006/xaml/presentation

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.

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 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
System.Windows.Ink Namespace