SPNavigationNodeCollection class

Provides a strongly typed collection of SPNavigationNode objects.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPAutoSerializingObject
    Microsoft.SharePoint.SPBaseCollection
      Microsoft.SharePoint.Navigation.SPNavigationNodeCollection

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

Syntax

'Declaration
Public NotInheritable Class SPNavigationNodeCollection _
    Inherits SPBaseCollection
'Usage
Dim instance As SPNavigationNodeCollection
public sealed class SPNavigationNodeCollection : SPBaseCollection

Remarks

An instance of this class is returned by the GlobalNodes, QuickLaunch, and TopNavigationBar properties of an SPNavigation object and also by the Children property of an SPNavigationNode object.

In a hierarchical navigation structure such as QuickLaunch, the tree is rooted on a single SPNavigationNode object. This object has a Children property that returns an SPNavigationNodeCollection object with navigation nodes one level down from the root. Each of these nodes has a Children property that can contain a collection of nodes for another level down the hierarchy.

You can get the parent node for a collection by getting the value of the collection's Parent property. You can return to the collection by getting the value of the parent node's Children property.

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See also

Reference

SPNavigationNodeCollection members

Microsoft.SharePoint.Navigation namespace

Microsoft.SharePoint.Navigation.SPNavigationNode

Microsoft.SharePoint.SPBaseCollection

Other resources

Adding Links to the Top Link Bar

Adding Links to Quick Launch