Export (0) Print
Expand All

SPNavigationNodeCollection Class

Provides a strongly typed collection of SPNavigationNode objects.

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

[ClientCallableTypeAttribute(Name = "NavigationNodeCollection", ServerTypeId = "{2d818ed7-8fef-4a1c-bceb-a9404dfa482f}", 
	CollectionChildItemType = typeof(SPNavigationNode))]
[SubsetCallableTypeAttribute]
public sealed class SPNavigationNodeCollection : SPBaseCollection

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.

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