Menu.MenuItemCollection

Wisej.Web.Menu MenuItemCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (3.5.0.0)

Represents a collection of MenuItem objects.

public class MenuItemCollection : IList, ICollection, IEnumerable

Constructors

Initializes a new instance of MenuItemCollection.

NameTypeDescription

owner

The Menu object that owns the collection.

Properties

Int32: Returns the number of items in the collection.

Boolean: Returns a value indicating whether this collection can be modified.

MenuItem: Retrieves the item at the specified index within the collection.

Throws:

MenuItem: Retrieves the item at the specified index within the collection.

Methods

Adds an item to the list of items.

ParameterTypeDescription

caption

The text of the new menu item.

Returns: MenuItem.

Adds an item to the list of items.

ParameterTypeDescription

caption

The text of the new menu item.

onClick

An event handler for the click event.

Returns: MenuItem.

Adds an item to the list of items.

ParameterTypeDescription

caption

The text of the new menu item.

items

List of child menu items.

Returns: MenuItem.

Adds an item to the list of items.

ParameterTypeDescription

item

The new menu item.

Returns: Int32.

Adds an item to the list of items.

ParameterTypeDescription

index

The index where to add/insert the new menu item.

item

The MenuItem to add to the collection

Returns: Int32.

Adds a collection of items to the list.

ParameterTypeDescription

items

Removes all items from the Menu.

Removes and disposes all items from the Menu.

ParameterTypeDescription

dispose

Indicates whether the removed items should be disposed.

Determines if the specified item is located within the collection.

ParameterTypeDescription

value

An object representing the item to locate in the collection.

Returns: Boolean. true if the item is located within the collection; otherwise, false.

Determines if the specified item is located within the collection.

ParameterTypeDescription

key

The key of the item to locate.

Returns: Boolean. true if the item is located within the collection; otherwise, false.

Copies the entire collection into an existing array of objects at a specified location within the array.

ParameterTypeDescription

dest

The object array to copy the collection to.

index

The location in the destination array to copy the collection to.

Finds all the items with a specific key.

ParameterTypeDescription

key

The key of the item to locate.

searchAllChildren

Indicates that the search should include child items.

Returns: MenuItem[].

Returns an enumerator that can be used to iterate through the item collection.

Returns: IEnumerator. A IEnumerator that represents the item collection.

Retrieves the index within the collection of the specified item.

ParameterTypeDescription

value

The menu item to locate.

Returns: Int32. The zero-based index where the item is located within the collection; otherwise, -1.

Throws:

Retrieves the index within the collection of the specified item.

ParameterTypeDescription

key

The key for the menu item to locate.

Returns: Int32. The zero-based index where the item is located within the collection; otherwise, -1.

Removes the specified item from the list.

ParameterTypeDescription

item

The item to remove.

Removes an item at the specified index.

ParameterTypeDescription

index

The index of the item to remove.

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.

Removes the item with the specified key.

ParameterTypeDescription

key

The key of the menu item to remove.

Last updated