Поделиться через


ContextNodeBase.ParentNode - свойство

Обновлен: Ноябрь 2007

Gets the parent node of the ContextNodeBase in the context node tree.

Пространство имен:  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
The parent node of the ContextNodeBase in the context node tree.

Заметки

Returns nullссылка null (Nothing в Visual Basic) if this is the RootNode.

Примеры

This example uses a ContextNodeBase that was found using a Hashtable that maps tree nodes to context nodes using a System.Windows.Forms.TreeView named theTreeView. After the parent node is found, a method called MarkNodeAsRed is called to change the node's strokes to be red.

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 с пакетом обновления 2 (SP2), Windows Server 2003

Среды .NET Framework и .NET Compact Framework поддерживают не все версии каждой платформы. Поддерживаемые версии перечислены в разделе Требования к системе для .NET Framework.

Сведения о версии

.NET Framework

Поддерживается в версии: 3.0

См. также

Ссылки

ContextNodeBase Класс

ContextNodeBase - члены

System.Windows.Ink.AnalysisCore - пространство имен

ContextNodeBase.SubNodes