Class ListBoxItemCollection
- Namespace
- GHIElectronics.Endpoint.UI.Controls
- Assembly
- GHIElectronics.Endpoint.UI.dll
public class ListBoxItemCollection : ICollection, IEnumerable
- Inheritance
-
ListBoxItemCollection
- Implements
- Inherited Members
Constructors
ListBoxItemCollection(ListBox, UIElementCollection)
public ListBoxItemCollection(ListBox listBox, UIElementCollection items)
Parameters
listBoxListBoxitemsUIElementCollection
Properties
Count
Gets the number of elements contained in the ICollection.
public int Count { get; }
Property Value
- int
The number of elements contained in the ICollection.
IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
public bool IsSynchronized { get; }
Property Value
- bool
true if access to the ICollection is synchronized (thread safe); otherwise, false.
this[int]
public ListBoxItem this[int index] { get; set; }
Parameters
indexint
Property Value
SyncRoot
Gets an object that can be used to synchronize access to the ICollection.
public object SyncRoot { get; }
Property Value
- object
An object that can be used to synchronize access to the ICollection.
Methods
Add(ListBoxItem)
public int Add(ListBoxItem item)
Parameters
itemListBoxItem
Returns
Add(UIElement)
public int Add(UIElement element)
Parameters
elementUIElement
Returns
Clear()
public void Clear()
Contains(ListBoxItem)
public bool Contains(ListBoxItem item)
Parameters
itemListBoxItem
Returns
CopyTo(Array, int)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
public void CopyTo(Array array, int index)
Parameters
arrayArrayThe one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.
indexintThe zero-based index in
arrayat which copying begins.
Exceptions
- ArgumentNullException
arrayis null.- ArgumentOutOfRangeException
indexis less than zero.- ArgumentException
arrayis multidimensional.-or-
The number of elements in the source ICollection is greater than the available space from
indexto the end of the destinationarray.-or-
The type of the source ICollection cannot be cast automatically to the type of the destination
array.
GetEnumerator()
Returns an enumerator that iterates through a collection.
public IEnumerator GetEnumerator()
Returns
- IEnumerator
An IEnumerator object that can be used to iterate through the collection.
IndexOf(ListBoxItem)
public int IndexOf(ListBoxItem item)
Parameters
itemListBoxItem
Returns
Insert(int, ListBoxItem)
public void Insert(int index, ListBoxItem item)
Parameters
indexintitemListBoxItem
Remove(ListBoxItem)
public void Remove(ListBoxItem item)
Parameters
itemListBoxItem
RemoveAt(int)
public void RemoveAt(int index)
Parameters
indexint