Show / Hide Table of Contents

Class DefinitionCollection<T>

Implementation of generic container for definitions. This collection is thread safe.

Inheritance
System.Object
DefinitionCollection<T>
ColumnDefinitionCollection
RowDefinitionCollection
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
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
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class DefinitionCollection<T> : IList<T>, ICollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable
Type Parameters
Name Description
T

Constructors

DefinitionCollection(UIElement)

Initializes a new instance of the DefinitionCollection<T> class.

Declaration
public DefinitionCollection(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>.

IsFixedSize

Gets a value indicating whether the System.Collections.IList has a fixed size.

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

true if the System.Collections.IList has a fixed size; otherwise, false.

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.

IsSynchronized

Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).

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

true if access to the System.Collections.ICollection is synchronized (thread safe); otherwise, false.

Item[Int32]

Gets or sets the element at the specified index.

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

The index.

Property Value
Type Description
T

SyncRoot

Gets an object that can be used to synchronize access to the System.Collections.ICollection.

Declaration
public object SyncRoot { get; }
Property Value
Type Description
System.Object

An object that can be used to synchronize access to the System.Collections.ICollection.

Methods

Add(T)

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

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

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

Add(Object)

Adds an item to the System.Collections.IList.

Declaration
public int Add(object value)
Parameters
Type Name Description
System.Object value

The object to add to the System.Collections.IList.

Returns
Type Description
System.Int32

The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection,

Clear()

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

Declaration
public void Clear()

Contains(T)

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

Declaration
public bool Contains(T item)
Parameters
Type Name Description
T 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.

Contains(Object)

Determines whether the System.Collections.IList contains a specific value.

Declaration
public bool Contains(object value)
Parameters
Type Name Description
System.Object value

The object to locate in the System.Collections.IList.

Returns
Type Description
System.Boolean

true if the System.Object is found in the System.Collections.IList; otherwise, false.

CopyTo(T[], Int32)

Copies to.

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

The array.

System.Int32 arrayIndex

Index of the array.

CopyTo(Array, Int32)

Copies the elements of the System.Collections.ICollection to an System.Array, starting at a particular System.Array index.

Declaration
public void CopyTo(Array array, int index)
Parameters
Type Name Description
System.Array array

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

System.Int32 index

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

GetEnumerator()

Returns an enumerator that iterates through the collection.

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

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

IndexOf(T)

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

Declaration
public int IndexOf(T item)
Parameters
Type Name Description
T 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.

IndexOf(Object)

Determines the index of a specific item in the System.Collections.IList.

Declaration
public int IndexOf(object value)
Parameters
Type Name Description
System.Object value

The object to locate in the System.Collections.IList.

Returns
Type Description
System.Int32

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

Insert(Int32, T)

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

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

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

T item

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

Insert(Int32, Object)

Inserts an item to the System.Collections.IList at the specified index.

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

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

System.Object value

The object to insert into the System.Collections.IList.

Remove(T)

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

Declaration
public bool Remove(T item)
Parameters
Type Name Description
T 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>.

Remove(Object)

Removes the first occurrence of a specific object from the System.Collections.IList.

Declaration
public void Remove(object value)
Parameters
Type Name Description
System.Object value

The object to remove from the System.Collections.IList.

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.

IList.Item[Int32]

Gets or sets the element at the specified index.

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

The index.

Returns
Type Description
System.Object

Implements

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