Class UIElementCollection
Implements container for elements
Inheritance
Implements
Inherited Members
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 |
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 |
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 |
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 |
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. |