ContextNode.ParentNode Property
Gets the parent node of the ContextNode in the context node tree.
Namespace: Microsoft.Ink
Assembly: Microsoft.Ink.Analysis (in Microsoft.Ink.Analysis.dll)
Syntax
'Declaration
Public ReadOnly Property ParentNode As ContextNode
'Usage
Dim instance As ContextNode
Dim value As ContextNode
value = instance.ParentNode
public ContextNode ParentNode { get; }
public:
property ContextNode^ ParentNode {
ContextNode^ get ();
}
public function get ParentNode () : ContextNode
Property Value
Type: Microsoft.Ink.ContextNode
The parent node of the ContextNode.
Remarks
Returns nulla null reference (Nothing in Visual Basic) if this is the RootNode.
Examples
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);
}
Platforms
Windows 7, Windows Vista, Windows Server 2008 R2, Windows Server 2008
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