ContextNodeBase.ParentNode 属性

获取上下文节点树中的 ContextNodeBase 的父节点。

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

语法

声明
Public ReadOnly Property ParentNode As ContextNodeBase
用法
Dim instance As ContextNodeBase
Dim value As ContextNodeBase

value = instance.ParentNode
public ContextNodeBase ParentNode { get; }
public:
property ContextNodeBase^ ParentNode {
    ContextNodeBase^ get ();
}
/** @property */
public ContextNodeBase get_ParentNode()
public function get ParentNode () : ContextNodeBase

属性值

类型:System.Windows.Ink.AnalysisCore.ContextNodeBase
上下文节点树中 ContextNodeBase 的父节点。

备注

如果该节点是 RootNode,则返回 nullnull 引用(在 Visual Basic 中为 Nothing)。

示例

此示例使用通过 Hashtable 找到的一个 ContextNodeBase,该 Hashtable 使用名为 theTreeView 的 System.Windows.Forms.TreeView 将树节点映射到上下文节点。找到父节点后,将调用名为 MarkNodeAsRed 的方法将该节点的笔画更改为红色。

Dim selectedNode As ContextNodeBase = CType(Me.theTreeView.SelectedNode.Tag, ContextNodeBase)
Dim parentNode As ContextNodeBase = selectedNode.ParentNode
If Not (parentNode Is Nothing) Then
    MarkNodeAsRed(parentNode)
End If
ContextNodeBase selectedNode = (ContextNodeBase)this.theTreeView.SelectedNode.Tag;
ContextNodeBase parentNode = selectedNode.ParentNode;
if (parentNode != null)
{
    MarkNodeAsRed(parentNode);
}

平台

Windows Vista, Windows XP SP2, Windows Server 2003

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

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

ContextNodeBase 类

ContextNodeBase 成员

System.Windows.Ink.AnalysisCore 命名空间

ContextNodeBase.SubNodes