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


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

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

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

Пространство имен:  Microsoft.Ink
Сборка:  Microsoft.Ink.Analysis (в Microsoft.Ink.Analysis.dll)

Синтаксис

'Декларация
Public ReadOnly Property ParentNode As ContextNode
'Применение
Dim instance As ContextNode
Dim value As ContextNode

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

Значение свойства

Тип: Microsoft.Ink.ContextNode
The parent node of the ContextNode.

Заметки

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

Примеры

This example uses a System.Windows.Forms.TreeView, theTreeView, where each TreeNode has its Tag property set to a ContextNode. It finds the selected node and then uses ParentNode to find its parent. After the parent node is found, it calls the MarkNodeAsRed method to change the node's strokes to red.

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

Платформы

Windows Vista

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

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

.NET Framework

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

См. также

Ссылки

ContextNode Класс

ContextNode - члены

Microsoft.Ink - пространство имен

ContextNode.SubNodes