PopupMenuCollection Class
Encapsulates a collection of PopupMenu objects.
public class PopupMenuCollection : SimpleCollection<PopupMenu>
- Inheritance:
- object Collection<PopupMenu> SimpleCollection<PopupMenu> object
Remarks
This class is a zero-based indexed collection.
Properties
this[string]
public PopupMenu? this[string key] { get; }
| Parameter | Type | Description |
|---|---|---|
| key | string |
Property Value
See Also
Methods
Contains(string)
public virtual bool Contains(string key)
| Parameter | Type | Description |
|---|---|---|
| key | string |
Returns
- bool:
trueif the name is found in the collection; otherwise,false.
See Also
IndexOf(string)
Searches for the specified Key of a PopupMenu and returns the zero-based index of the first occurrence within the entire collection.
public virtual int IndexOf(string key)
| Parameter | Type | Description |
|---|---|---|
| key | string |
Returns
- int:
The zero-based index of the first occurrence of the Key within the entire collection, if found; otherwise,
-1.
See Also
OnItemAdded(int, PopupMenu)
Performs additional custom processes after an item is added to the collection.
protected override void OnItemAdded(int index, PopupMenu value)
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index at which the item was inserted. |
| value | PopupMenu | The object that was inserted. |
Remarks
The default implementation of this method is intended to be overridden by a derived class to perform some action after the specified object is added.
See Also
OnItemRemoving(int, PopupMenu)
Performs additional custom processes before an item is removed from the collection.
protected override void OnItemRemoving(int index, PopupMenu value)
| Parameter | Type | Description |
|---|---|---|
| index | int | The zero-based index from which the item was removed. |
| value | PopupMenu | The object that was removed. |
Remarks
The default implementation of this method is intended to be overridden by a derived class to perform some action before the specified object is removed.
See Also
OnValidate(PopupMenu, int)
Performs additional custom processes when validating a value.
protected override void OnValidate(PopupMenu value, int existingIndex)
| Parameter | Type | Description |
|---|---|---|
| value | PopupMenu | The object to validate. |
| existingIndex | int | The index within the collection of the object that would be replaced by the value. |
Remarks
The default implementation of this method determines whether value is null, and if so,
throws ArgumentNullException. It is intended to be overridden by a derived class to
perform additional action when the specified element is validated.
See Also
Inherited Members
- SimpleCollection<PopupMenu>.AddRange(IEnumerable<PopupMenu>)
- SimpleCollection<PopupMenu>.ClearItems()
- SimpleCollection<PopupMenu>.FindIndex(Predicate<PopupMenu>)
- SimpleCollection<PopupMenu>.FindIndex(int, Predicate<PopupMenu>)
- SimpleCollection<PopupMenu>.FindIndex(int, int, Predicate<PopupMenu>)
- SimpleCollection<PopupMenu>.FindLastIndex(int, Predicate<PopupMenu>)
- SimpleCollection<PopupMenu>.FindLastIndex(int, int, Predicate<PopupMenu>)
- SimpleCollection<PopupMenu>.ForEach(Action<PopupMenu>)
- SimpleCollection<PopupMenu>.IndexOf(PopupMenu, int)
- SimpleCollection<PopupMenu>.IndexOf(PopupMenu, int, int)
- SimpleCollection<PopupMenu>.InsertItem(int, PopupMenu)
- SimpleCollection<PopupMenu>.InsertRange(int, IEnumerable<PopupMenu>)
- SimpleCollection<PopupMenu>.LastIndexOf(PopupMenu)
- SimpleCollection<PopupMenu>.LastIndexOf(PopupMenu, int)
- SimpleCollection<PopupMenu>.OnItemAdding(int, PopupMenu)
- SimpleCollection<PopupMenu>.OnItemRemoved(int, PopupMenu)
- SimpleCollection<PopupMenu>.RemoveItem(int)
- SimpleCollection<PopupMenu>.SetItem(int, PopupMenu)
- SimpleCollection<PopupMenu>.Sort()
- SimpleCollection<PopupMenu>.Sort(Comparison<PopupMenu>)
- SimpleCollection<PopupMenu>.Sort(IComparer<PopupMenu>)
- SimpleCollection<PopupMenu>.DefaultComparer
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()
Extension Methods
- ObjectExtensions.TryConvertToDouble(object, out double)
- ObjectExtensions.TryConvertToDouble(object, IFormatProvider, out double)