SPNavigationNodeCollection.Parent property

Gets the parent node (SPNavigationNode) of the collection.

Namespace:  Microsoft.SharePoint.Navigation
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public ReadOnly Property Parent As SPNavigationNode
    Get
'Usage
Dim instance As SPNavigationNodeCollection
Dim value As SPNavigationNode

value = instance.Parent
public SPNavigationNode Parent { get; }

Property value

Type: Microsoft.SharePoint.Navigation.SPNavigationNode
The parent node for the collection.

Remarks

In a hierarchical navigation structure, the tree is rooted on a single SPNavigationNode object. This object has a Children property that returns a SPNavigationNodeCollection object. The collection's Parent property returns the root node (the parent of the children).

The SPNavigationNode objects in a collection also have a Parent property, which returns an SPNavigationNode object, not an SPNavigationNodeCollection object. The parent for nodes in a collection is the same object as the parent for the collection.

See also

Reference

SPNavigationNodeCollection class

SPNavigationNodeCollection members

Microsoft.SharePoint.Navigation namespace