Compartilhar via


SPNavigationNodeCollection.Parent Property

Gets the parent node (SPNavigationNode) of the collection.

Namespace:  Microsoft.SharePoint.Navigation
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

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