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

Represents a stack of UI layers that can be used to manage the rendering order and visibility of UI components.

Definition

Namespace:Telerik.Windows.Documents.UI.Layers

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public class UILayerStack : ICollection<IUILayer>, IEnumerable<IUILayer>, IEnumerable

Inheritance: objectUILayerStack

Implements: ICollection<IUILayer>IEnumerableIEnumerable<IUILayer>

Constructors

C#
public UILayerStack()

Properties

Gets the number of layers in the UI layer stack.

C#
public int Count { get; }

Implements: ICollection<IUILayer>.Count

Gets a value indicating whether the layer stack is read-only.

C#
public bool IsReadOnly { get; }

Implements: ICollection<IUILayer>.IsReadOnly

Methods

Adds a specified UI layer after a given layer identified by its name.

C#
public bool AddAfter(string presentedLayerName, IUILayer layer)
Parameters:presentedLayerNamestring

The name of the layer after which the new layer will be added.

layerIUILayer

The UI layer to be added.

Returns:

bool

Returns true if the layer was successfully added; otherwise, false.

Adds a specified UI layer before an existing layer in the UILayerStack.

C#
public bool AddBefore(string presentedLayerName, IUILayer layer)
Parameters:presentedLayerNamestring

The name of the existing layer before which the new layer will be added.

layerIUILayer

The new UI layer to be added to the stack.

Returns:

bool

Returns true if the layer was successfully added; otherwise, false.

Adds a new UI layer to the beginning of the layer stack.

C#
public void AddFirst(IUILayer layer)
Parameters:layerIUILayer

The UI layer to be added to the stack.

Adds a new layer to the end of the layer stack.

C#
public void AddLast(IUILayer layer)
Parameters:layerIUILayer

The UI layer to be added to the stack.

Clears all layers from the UILayerStack, removing any elements currently present.

C#
public void Clear()

Implements: ICollection<IUILayer>.Clear()

Determines whether the specified UI layer exists in the layer stack.

C#
public bool Contains(IUILayer layer)
Parameters:layerIUILayer

The UI layer to locate in the layer stack.

Returns:

bool

True if the specified layer is found in the stack; otherwise, false.

Implements: ICollection<IUILayer>.Contains(IUILayer)

Determines whether the specified string is contained within the UILayerStack.

C#
public bool Contains(string layerName)
Parameters:layerNamestring

The name of the layer to search for in the UILayerStack.

Returns:

bool

True if the UILayerStack contains the specified layer; otherwise, false.

Copies the elements of the UILayerStack to a specified array, starting at a particular index.

C#
public void CopyTo(IUILayer[] array, int arrayIndex)
Parameters:arrayIUILayer[]

The one-dimensional array that is the destination of the elements copied from the UILayerStack.

arrayIndexint

The zero-based index in the array at which storing the copied elements will begin.

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

Retrieves an enumerator that iterates through the elements of the UILayerStack.

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

IEnumerator<IUILayer>

An enumerator that provides access to the elements in the UILayerStack.

Implements: IEnumerable<IUILayer>.GetEnumerator()

Retrieves a specific layer from the layer stack by its name.

C#
public IUILayer GetLayerByName(string layerName)
Parameters:layerNamestring

The name of the layer to retrieve.

Returns:

IUILayer

The layer associated with the specified name, or null if no layer with that name exists.

Removes the specified UI layer from the layer stack.

C#
public bool Remove(IUILayer layer)
Parameters:layerIUILayer

The UI layer to be removed from the stack.

Returns:

bool

Returns true if the layer was successfully removed; otherwise, false.

Implements: ICollection<IUILayer>.Remove(IUILayer)

Removes the specified layer from the UILayerStack.

C#
public bool Remove(string layerName)
Parameters:layerNamestring

The name of the layer to be removed.

Returns:

bool

Returns true if the layer was successfully removed; otherwise, false.