Class ListBoxItems
Represents a collection of items within a list box.
public class ListBoxItems : IList<object>, ICollection<object>, IReadOnlyList<object>, IReadOnlyCollection<object>, IEnumerable<object>, IList, ICollection, IEnumerable
- Inheritance
-
ListBoxItems
- Implements
Remarks
This class provides list-like behavior and supports multiple collection interfaces. It enables item management, enumeration, and indexing within a structured list.
Constructors
- ListBoxItems()
Initializes a new instance of the ListBoxItems class.
- ListBoxItems(BaseCollection<ListControlItem>)
Initializes a new instance of the ListBoxItems class to use live items from the specified collection.
- ListBoxItems(IEnumerable<object>)
Initializes a new instance of the ListBoxItems class.
Properties
- Count
Gets the number of elements contained in the ICollection<T>.
- IsFixedSize
Gets a value indicating whether the IList has a fixed size.
- IsReadOnly
Gets a value indicating whether the ICollection<T> is read-only.
- IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
- this[int]
Gets or sets the element at the specified index.
- SyncRoot
Gets an object that can be used to synchronize access to the ICollection.
Methods
- Add(object)
Adds an item to the ICollection<T>.
- AddRange(IEnumerable<object>)
Adds multiple items to the collection.
- Clear()
Removes all items from the ICollection<T>.
- Contains(object?)
Determines whether the ICollection<T> contains a specific value.
- CopyTo(object[], int)
Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.
- ~ListBoxItems()
Finalizes an instance of the ListBoxItems class.
- GetEnumerator()
Returns an enumerator that iterates through the collection.
- IndexOf(object?)
Determines the index of a specific item in the IList<T>.
- Insert(int, object?)
Inserts an item to the IList<T> at the specified index.
- Remove(object?)
Removes the first occurrence of a specific object from the ICollection<T>.
- RemoveAt(int)
Removes the IList<T> item at the specified index.
Events
- CollectionChanged
Occurs when the collection's contents change.
- PropertyChanged
Occurs when a property value changes.
Operators
- implicit operator ListBoxItems(object[])
Implicitly converts an object collection to a ListBoxItems collection.