InkAnalyzer.RootNode 属性

获取 InkAnalyzer 的根 ContextNode

命名空间:  System.Windows.Ink
程序集:  IAWinFX(在 IAWinFX.dll 中)

语法

声明
Public ReadOnly Property RootNode As ContextNode
用法
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

属性值

类型:System.Windows.Ink.ContextNode
InkAnalyzer 的根 ContextNode

备注

InkAnalyzer 维护 ContextNode 对象树。这些对象包含分析的输入和分析的结果。当笔画最初添加到 InkAnalyzer 时,InkAnalyzer 将这些笔画分配给 UnclassifiedInkNode。笔画经过分析后由 InkAnalyzer 分配给树中相应的 ContextNode 对象。

示例

此示例调用帮助器方法 CheckTreeNodes 检查 InkAnalyzer(名为 theInkAnalyzer)当前维护的所有 ContextNode 对象。

' 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);

在此示例中,CheckTreeNodes 将有关遇到的每个节点的信息发送给调试输出。

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();
}

平台

Windows Vista

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

InkAnalyzer 类

InkAnalyzer 成员

System.Windows.Ink 命名空间