Share via


ContextNodeBase.ParentNode Property

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

Namespace:  System.Windows.Ink.AnalysisCore
Assembly:  IACore (in IACore.dll)

Syntax

'Declaration
Public ReadOnly Property ParentNode As ContextNodeBase
'Usage
Dim instance As ContextNodeBase 
Dim value As ContextNodeBase 

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

Property Value

Type: System.Windows.Ink.AnalysisCore.ContextNodeBase
The parent node of the ContextNodeBase in the context node tree.

Remarks

Returns nulla null reference (Nothing in Visual Basic) if this is the RootNode.

Examples

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

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

ContextNodeBase Class

ContextNodeBase Members

System.Windows.Ink.AnalysisCore Namespace

ContextNodeBase.SubNodes