New to Telerik UI for WPFStart a free 30-day trial

Represents Stack collection.

Definition

Namespace:Telerik.Windows.Documents.Utils

Assembly:Telerik.Windows.Controls.dll

Type Parameters:

T

Syntax:

C#
public class StackCollection<T> : ICollection<T>, IEnumerable<T>, IEnumerable where T : IStackCollectionElement

Inheritance: objectStackCollection<T>

Derived Classes: UILayerStack

Implements: ICollection<T>IEnumerableIEnumerable<T>

Constructors

Initializes a new instance of the StackCollection class.

C#
public StackCollection()

Properties

Gets the number of elements contained in the collection.

C#
public int Count { get; }
Property Value:

The number of elements contained in the collection.

Implements: ICollection<T>.Count

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

C#
public bool IsReadOnly { get; }
Property Value:

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

Implements: ICollection<T>.IsReadOnly

Methods

Adds the specified item.

C#
public void Add(T item)
Parameters:itemT

The item.

Implements: ICollection<T>.Add(T)

Adds the after.

C#
public bool AddAfter(string presentedElementName, T element)
Parameters:presentedElementNamestring

Name of the presented element.

elementT

The element.

Returns:

bool

Adds the before.

C#
public bool AddBefore(string presentedElementName, T layer)
Parameters:presentedElementNamestring

Name of the presented element.

layerT

The layer.

Returns:

bool

Adds the first.

C#
public void AddFirst(T element)
Parameters:elementT

The element.

Adds the last.

C#
public void AddLast(T element)
Parameters:elementT

The element.

Removes all items from the ICollection<T>.

C#
public void Clear()
Exceptions:

NotSupportedException

The ICollection<T> is read-only.

Implements: ICollection<T>.Clear()

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

C#
public bool Contains(string elementName)
Parameters:elementNamestring

Name of the element.

Returns:

bool

Determines whether [contains] [the specified item].

C#
public bool Contains(T item)
Parameters:itemT

The item.

Returns:

bool

Implements: ICollection<T>.Contains(T)

Copies to.

C#
public void CopyTo(T[] array, int arrayIndex)
Parameters:arrayT[]

The array.

arrayIndexint

Index of the array.

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

Gets the name of the element by.

C#
public T GetElementByName(string elementName)
Parameters:elementNamestring

Name of the element.

Returns:

T

Returns an enumerator that iterates through the collection.

C#
public IEnumerator<T> GetEnumerator()
Returns:

IEnumerator<T>

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

Implements: IEnumerable<T>.GetEnumerator()

Removes the specified element name.

C#
public bool Remove(string elementName)
Parameters:elementNamestring

Name of the element.

Returns:

bool

Removes the specified item.

C#
public bool Remove(T item)
Parameters:itemT

The item.

Returns:

bool

Implements: ICollection<T>.Remove(T)