Class
UILayerStack

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:

cs-api-definition
public class UILayerStack : ICollection<IUILayer>, IEnumerable<IUILayer>, IEnumerable

Inheritance: objectUILayerStack

Implements: ICollection<IUILayer>IEnumerableIEnumerable<IUILayer>

Constructors

UILayerStack()

Declaration

cs-api-definition
public UILayerStack()

Properties

Count

Gets the number of layers in the UI layer stack.

Declaration

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

Property Value

int

Implements ICollection<IUILayer>.Count

IsReadOnly

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

Declaration

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

Property Value

bool

Implements ICollection<IUILayer>.IsReadOnly

Methods

AddAfter(string, IUILayer)

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

Declaration

cs-api-definition
public bool AddAfter(string presentedLayerName, IUILayer layer)

Parameters

presentedLayerName

string

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

layer

IUILayer

The UI layer to be added.

Returns

bool

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

AddBefore(string, IUILayer)

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

Declaration

cs-api-definition
public bool AddBefore(string presentedLayerName, IUILayer layer)

Parameters

presentedLayerName

string

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

layer

IUILayer

The new UI layer to be added to the stack.

Returns

bool

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

AddFirst(IUILayer)

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

Declaration

cs-api-definition
public void AddFirst(IUILayer layer)

Parameters

layer

IUILayer

The UI layer to be added to the stack.

AddLast(IUILayer)

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

Declaration

cs-api-definition
public void AddLast(IUILayer layer)

Parameters

layer

IUILayer

The UI layer to be added to the stack.

Clear()

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

Declaration

cs-api-definition
public void Clear()

Implements ICollection<IUILayer>.Clear()

Contains(IUILayer)

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

Declaration

cs-api-definition
public bool Contains(IUILayer layer)

Parameters

layer

IUILayer

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)

Contains(string)

Determines whether the specified string is contained within the UILayerStack.

Declaration

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

Parameters

layerName

string

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

Returns

bool

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

CopyTo(IUILayer[], int)

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

Declaration

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

Parameters

array

IUILayer[]

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

arrayIndex

int

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

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

GetEnumerator()

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

Declaration

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

Returns

IEnumerator<IUILayer>

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

Implements IEnumerable<IUILayer>.GetEnumerator()

GetLayerByName(string)

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

Declaration

cs-api-definition
public IUILayer GetLayerByName(string layerName)

Parameters

layerName

string

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.

Remove(IUILayer)

Removes the specified UI layer from the layer stack.

Declaration

cs-api-definition
public bool Remove(IUILayer layer)

Parameters

layer

IUILayer

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)

Remove(string)

Removes the specified layer from the UILayerStack.

Declaration

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

Parameters

layerName

string

The name of the layer to be removed.

Returns

bool

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