A multi-item is a dynamic collection of menu items created at run time. Multi-items are useful when the items on a menu cannot be determined prior to run time or the items need to be modified based on the state of the system. A good example of this is the menu items at the bottom of the File menu representing the most recently used files. Inherit this abstract class to create a multi-item that can act like several adjacent menu items.

The MultiItem..::.ItemCollection type exposes the following members.

Methods

  NameDescription
Add
Adds an object to the end of the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
AddRange
Adds the elements of the specified collection to the end of the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
AsReadOnly
Returns a read-only IList<(Of <(T>)>) wrapper for the current collection.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
BinarySearchOverloaded.
Clear
Removes all elements from the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
Contains
Determines whether an element is in the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
ConvertAll<(Of <(TOutput>)>)
Converts the elements in the current List<(Of <(T>)>) to another type, and returns a list containing the converted elements.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
CopyToOverloaded.
Equals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Exists
Determines whether the List<(Of <(T>)>) contains elements that match the conditions defined by the specified predicate.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
Finalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Find
Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
FindAll
Retrieves all the elements that match the conditions defined by the specified predicate.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
FindIndexOverloaded.
FindLast
Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
FindLastIndexOverloaded.
ForEach
Performs the specified action on each element of the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
GetEnumerator
Returns an enumerator that iterates through the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
GetRange
Creates a shallow copy of a range of elements in the source List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
GetType
Gets the Type of the current instance.
(Inherited from Object.)
IndexOfOverloaded.
Insert
Inserts an element into the List<(Of <(T>)>) at the specified index.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
InsertRange
Inserts the elements of a collection into the List<(Of <(T>)>) at the specified index.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
LastIndexOfOverloaded.
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Remove
Removes the first occurrence of a specific object from the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
RemoveAll
Removes the all the elements that match the conditions defined by the specified predicate.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
RemoveAt
Removes the element at the specified index of the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
RemoveRange
Removes a range of elements from the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
ReverseOverloaded.
SortOverloaded.
ToArray
Copies the elements of the List<(Of <(T>)>) to a new array.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
ToString
Returns a String that represents the current Object.
(Inherited from Object.)
TrimExcess
Sets the capacity to the actual number of elements in the List<(Of <(T>)>), if that number is less than a threshold value.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
TrueForAll
Determines whether every element in the List<(Of <(T>)>) matches the conditions defined by the specified predicate.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)

Properties

  NameDescription
Capacity
Gets or sets the total number of elements the internal data structure can hold without resizing.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
Count
Gets the number of elements actually contained in the List<(Of <(T>)>).
(Inherited from List<(Of <(MultiItem..::.Item>)>).)
Item
Gets or sets the element at the specified index.
(Inherited from List<(Of <(MultiItem..::.Item>)>).)

See Also