skmMenu: An ASP.NET Menu Control

MenuItemCollection Members

MenuItemCollection overview

Public Instance Constructors

MenuItemCollection ConstructorInitializes a new instance of the MenuItemCollection class.

Public Instance Properties

Count Returns the number of elements in the MenuItemCollection.
IsSynchronized Gets a value indicating whether access to the MenuItemCollection is synchronized (thread-safe).
ItemOverloaded. Gets the MenuItem at a specified ordinal index.
SyncRoot Gets an object that can be used to synchrnoize access to the MenuItemCollection.

Public Instance Methods

Add Adds a MenuItem to the collection. If the ViewState is being tracked, the MenuItem's TrackViewState() method is called and the item is set to dirty, so that we don't lose any settings made prior to the Add() call.
AddHeader Adds a header to the collection.
AddRange Adds the MenuItems in a MenuItemCollection.
AddSpacerOverloaded. Adds a spacer to the collection.
Clear Clears out the entire MenuItemCollection.
Contains Determines if a particular MenuItem exists within the collection.
CopyTo Copies the contents of the MenuItem to an array.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetEnumerator Gets an Enumerator for enumerating through the collection.
GetHashCode (inherited from Object)Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
IndexOf Returns the ordinal index of a MenuItem, if it exists; if the item does not exist, -1 is returned.
Insert Inserts a MenuItem instance at a particular location in the collection.
Remove Removes a specified MenuItem from the collection.
RemoveAt Removes a MenuItem from a particular ordinal position in the collection.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

Private Instance Properties

System.Web.UI.IStateManager.IsTrackingViewState

Explicit Interface Implementations

IStateManager.LoadViewState Iterate through the object array passed in. For each element in the object array passed-in, a new MenuItem instance is created, added to the collection, and populated by calling LoadViewState().
IStateManager.SaveViewState Saves the view state in an object array. Each item in the collection has its SaveViewState() method called. This array is then returned, representing the state of the MenuItemCollection.
IStateManager.TrackViewState Indicates that changes to the view state should be tracked. Calls TrackViewState() for each MenuItem in the collection.

See Also

MenuItemCollection Class | skmMenu Namespace