Menu.MenuItemCollection
Wisej.Web.Menu MenuItemCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (3.2.0.0)
Represents a collection of MenuItem objects.
Constructors
MenuItemCollection(owner)

Initializes a new instance of MenuItemCollection.
Properties
Count

Int32: Returns the number of items in the collection.
IsReadOnly

Boolean: Returns a value indicating whether this collection can be modified.
Item(index)

MenuItem: Retrieves the item at the specified index within the collection.
Throws:
ArgumentOutOfRangeException The index was less than zero; or the index was greater of equal to the count of items in the collection.
Item(key)

MenuItem: Retrieves the item at the specified index within the collection.
Methods
Add(caption)

Adds an item to the list of items.
Returns: MenuItem.
Add(caption, onClick)

Adds an item to the list of items.
Returns: MenuItem.
Add(caption, items)

Adds an item to the list of items.
Returns: MenuItem.
Add(item)

Adds an item to the list of items.
Returns: Int32.
Add(index, item)

Adds an item to the list of items.
Returns: Int32.
AddRange(items)

Adds a collection of items to the list.
Clear()

Removes all items from the Menu.
Clear(dispose)

Removes and disposes all items from the Menu.
Contains(value)

Determines if the specified item is located within the collection.
Returns: Boolean. true if the item is located within the collection; otherwise, false.
ContainsKey(key)

Determines if the specified item is located within the collection.
Returns: Boolean. true if the item is located within the collection; otherwise, false.
CopyTo(dest, index)

Copies the entire collection into an existing array of objects at a specified location within the array.
Find(key, searchAllChildren)

Finds all the items with a specific key.
Returns: MenuItem[].
GetEnumerator()

Returns an enumerator that can be used to iterate through the item collection.
Returns: IEnumerator. A IEnumerator that represents the item collection.
IndexOf(value)

Retrieves the index within the collection of the specified item.
Returns: Int32. The zero-based index where the item is located within the collection; otherwise, -1.
Throws:
ArgumentNullException The value parameter was null.
IndexOfKey(key)

Retrieves the index within the collection of the specified item.
Returns: Int32. The zero-based index where the item is located within the collection; otherwise, -1.
Remove(item)

Removes the specified item from the list.
RemoveAt(index)

Removes an item at the specified index.
Throws:
ArgumentOutOfRangeException The index parameter was less than zero, or the index parameter was greater than or equal to the count of items in the collection.
RemoveByKey(key)

Removes the item with the specified key.
Last updated
Was this helpful?