Class
StackCollection<T>

Represents Stack collection.

Definition

Namespace:Telerik.Windows.Documents.Utils

Assembly:Telerik.Windows.Controls.dll

Type Parameters:

T

Syntax:

cs-api-definition
public class StackCollection<T> : ICollection<T>, IEnumerable<T>, IEnumerable where T : IStackCollectionElement

Inheritance: objectStackCollection<T>

Derived Classes: UILayerStack

Implements: ICollection<T>IEnumerableIEnumerable<T>

Constructors

StackCollection()

Initializes a new instance of the StackCollection class.

Declaration

cs-api-definition
public StackCollection()

Properties

Count

Gets the number of elements contained in the collection.

Declaration

cs-api-definition
public int Count { get; }

Property Value

int

The number of elements contained in the collection.

Implements ICollection<T>.Count

IsReadOnly

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

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

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

Implements ICollection<T>.IsReadOnly

Methods

Add(T)

Adds the specified item.

Declaration

cs-api-definition
public void Add(T item)

Parameters

item

T

The item.

Implements ICollection<T>.Add(T)

AddAfter(string, T)

Adds the after.

Declaration

cs-api-definition
public bool AddAfter(string presentedElementName, T element)

Parameters

presentedElementName

string

Name of the presented element.

element

T

The element.

Returns

bool

AddBefore(string, T)

Adds the before.

Declaration

cs-api-definition
public bool AddBefore(string presentedElementName, T layer)

Parameters

presentedElementName

string

Name of the presented element.

layer

T

The layer.

Returns

bool

AddFirst(T)

Adds the first.

Declaration

cs-api-definition
public void AddFirst(T element)

Parameters

element

T

The element.

AddLast(T)

Adds the last.

Declaration

cs-api-definition
public void AddLast(T element)

Parameters

element

T

The element.

Clear()

Removes all items from the ICollection<T>.

Declaration

cs-api-definition
public void Clear()

Exceptions

NotSupportedException

The ICollection<T> is read-only.

Implements ICollection<T>.Clear()

Contains(T)

Determines whether [contains] [the specified item].

Declaration

cs-api-definition
public bool Contains(T item)

Parameters

item

T

The item.

Returns

bool

Implements ICollection<T>.Contains(T)

Contains(string)

Determines whether [contains] [the specified element name].

Declaration

cs-api-definition
public bool Contains(string elementName)

Parameters

elementName

string

Name of the element.

Returns

bool

CopyTo(T[], int)

Copies to.

Declaration

cs-api-definition
public void CopyTo(T[] array, int arrayIndex)

Parameters

array

T[]

The array.

arrayIndex

int

Index of the array.

Implements ICollection<T>.CopyTo(T[], int)

GetElementByName(string)

Gets the name of the element by.

Declaration

cs-api-definition
public T GetElementByName(string elementName)

Parameters

elementName

string

Name of the element.

Returns

T

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration

cs-api-definition
public IEnumerator<T> GetEnumerator()

Returns

IEnumerator<T>

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

Implements IEnumerable<T>.GetEnumerator()

Remove(T)

Removes the specified item.

Declaration

cs-api-definition
public bool Remove(T item)

Parameters

item

T

The item.

Returns

bool

Implements ICollection<T>.Remove(T)

Remove(string)

Removes the specified element name.

Declaration

cs-api-definition
public bool Remove(string elementName)

Parameters

elementName

string

Name of the element.

Returns

bool