Show / Hide Table of Contents

Class UIElementCollection

Implements container for elements

Inheritance
System.Object
UIElementCollection
Implements
System.Collections.Generic.IList<UIElement>
System.Collections.Generic.ICollection<UIElement>
System.Collections.Generic.IEnumerable<UIElement>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: EmptyKeys.UserInterface.Controls
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class UIElementCollection : IList<UIElement>, ICollection<UIElement>, IEnumerable<UIElement>, IEnumerable

Constructors

UIElementCollection(UIElement)

Initializes a new instance of the UIElementCollection class.

Declaration
public UIElementCollection(UIElement parent)
Parameters
Type Name Description
UIElement parent

The parent.

Properties

Count

Gets the number of elements contained in the System.Collections.Generic.ICollection<T>.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

The number of elements contained in the System.Collections.Generic.ICollection<T>.

IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean

true if the System.Collections.Generic.ICollection<T> is read-only; otherwise, false.

Item[Int32]

Gets or sets the element at the specified index.

Declaration
public UIElement this[int index] { get; set; }
Parameters
Type Name Description
System.Int32 index

The index.

Property Value
Type Description
UIElement

Methods

Add(UIElement)

Adds an item to the System.Collections.Generic.ICollection<T>.

Declaration
public void Add(UIElement item)
Parameters
Type Name Description
UIElement item

The object to add to the System.Collections.Generic.ICollection<T>.

Clear()

Removes all items from the System.Collections.Generic.ICollection<T>.

Declaration
public void Clear()

Contains(UIElement)

Determines whether the System.Collections.Generic.ICollection<T> contains a specific value.

Declaration
public bool Contains(UIElement item)
Parameters
Type Name Description
UIElement item

The object to locate in the System.Collections.Generic.ICollection<T>.

Returns
Type Description
System.Boolean

true if item is found in the System.Collections.Generic.ICollection<T>; otherwise, false.

CopyTo(UIElement[], Int32)

Copies to.

Declaration
public void CopyTo(UIElement[] array, int arrayIndex)
Parameters
Type Name Description
UIElement[] array

The array.

System.Int32 arrayIndex

Index of the array.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<UIElement> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<UIElement>

A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.

IndexOf(UIElement)

Determines the index of a specific item in the System.Collections.Generic.IList<T>.

Declaration
public int IndexOf(UIElement item)
Parameters
Type Name Description
UIElement item

The object to locate in the System.Collections.Generic.IList<T>.

Returns
Type Description
System.Int32

The index of item if found in the list; otherwise, -1.

Insert(Int32, UIElement)

Inserts an item to the System.Collections.Generic.IList<T> at the specified index.

Declaration
public void Insert(int index, UIElement item)
Parameters
Type Name Description
System.Int32 index

The zero-based index at which item should be inserted.

UIElement item

The object to insert into the System.Collections.Generic.IList<T>.

Remove(UIElement)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection<T>.

Declaration
public bool Remove(UIElement item)
Parameters
Type Name Description
UIElement item

The object to remove from the System.Collections.Generic.ICollection<T>.

Returns
Type Description
System.Boolean

true if item was successfully removed from the System.Collections.Generic.ICollection<T>; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection<T>.

RemoveAt(Int32)

Removes the System.Collections.Generic.IList<T> item at the specified index.

Declaration
public void RemoveAt(int index)
Parameters
Type Name Description
System.Int32 index

The zero-based index of the item to remove.

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

An System.Collections.IEnumerator object that can be used to iterate through the collection.

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Back to top Generated by DocFX