Skip to main content

UIElementCollection Class

Namespace: GHIElectronics.TinyCLR.UI · Assembly: GHIElectronics.TinyCLR.UI

A UIElementCollection is a ordered collection of UIElements.

public class UIElementCollection : ICollection

Constructors

UIElementCollection(UIElement owner)

public UIElementCollection(UIElement owner)

No description available.

ParameterTypeDescription
ownerUIElement

Properties

Count

public virtual int Count { get; }

Gets the number of elements contained in the array. (inherited)

IsSynchronized

public virtual bool IsSynchronized { get; }

Gets a value indicating whether access to the collection is synchronized (thread-safe). (inherited)

SyncRoot

public virtual object SyncRoot { get; }

Gets an object that can be used to synchronize access to the collection. (inherited)

Capacity

public virtual int Capacity { get; set; }

Gets or sets the number of elements that the UIElementCollection can contain.

index]

public UIElement this[int index] { get; set; }

Indexer for the UIElementCollection. Gets or sets the UIElement stored at the zero-based index of the UIElementCollection.

Methods

CopyTo(Array array, int index)

public void CopyTo(Array array, int index)

Copies the UIElement collection to the specified array starting at the specified index.

ParameterTypeDescription
arrayArray
indexint

CopyTo(UIElement[] array, int index)

public virtual void CopyTo(UIElement[] array, int index)

Strongly typed version of CopyTo Copies the collection into the Array.

ParameterTypeDescription
arrayUIElement[]
indexint

Add(UIElement element)

public int Add(UIElement element)

Appends a UIElement to the end of the UIElementCollection.

ParameterTypeDescription
elementUIElement

Returns int — The UIElementCollection index at which the UIElement has been added.

IndexOf(UIElement element)

public int IndexOf(UIElement element)

Returns the zero-based index of the UIElement. If the UIElement is not in the UIElementCollection -1 is returned. If null is passed to the method, the index of the first entry with null is returned. If there is no null entry -1 is returned.

ParameterTypeDescription
elementUIElement

Returns int

Remove(UIElement element)

public void Remove(UIElement element)

Removes the specified element from the UIElementCollection.

ParameterTypeDescription
elementUIElementThe UIElement to remove from the UIElementCollection.

Contains(UIElement element)

public bool Contains(UIElement element)

Determines whether a element is in the UIElementCollection.

ParameterTypeDescription
elementUIElement

Returns bool

Clear()

public void Clear()

Removes all elements from the UIElementCollection.

Insert(int index, UIElement element)

public void Insert(int index, UIElement element)

Inserts an element into the UIElementCollection at the specified index.

ParameterTypeDescription
indexintThe zero-based index at which value should be inserted.
elementUIElementThe UIElement to insert.

RemoveAt(int index)

public void RemoveAt(int index)

Removes the UIElement at the specified index.

ParameterTypeDescription
indexintThe zero-based index of the element to remove.

RemoveRange(int index, int count)

public void RemoveRange(int index, int count)

Removes a range of UIElements from the UIElementCollection.

ParameterTypeDescription
indexintThe zero-based index of the range of elements to remove
countintThe number of elements to remove.