Table of Contents

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

listBox ListBox
items UIElementCollection

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

index int

Property Value

ListBoxItem

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

item ListBoxItem

Returns

int

Add(UIElement)

public int Add(UIElement element)

Parameters

element UIElement

Returns

int

Clear()

public void Clear()

Contains(ListBoxItem)

public bool Contains(ListBoxItem item)

Parameters

item ListBoxItem

Returns

bool

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

array Array

The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.

index int

The zero-based index in array at which copying begins.

Exceptions

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than zero.

ArgumentException

array is multidimensional.

-or-

The number of elements in the source ICollection is greater than the available space from index to the end of the destination array.

-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

item ListBoxItem

Returns

int

Insert(int, ListBoxItem)

public void Insert(int index, ListBoxItem item)

Parameters

index int
item ListBoxItem

Remove(ListBoxItem)

public void Remove(ListBoxItem item)

Parameters

item ListBoxItem

RemoveAt(int)

public void RemoveAt(int index)

Parameters

index int