Class UILayerStack
Represents a stack of UI layers that can be used to manage the rendering order and visibility of UI components.
Inheritance
Namespace: Telerik.Windows.Documents.UI.Layers
Assembly: Telerik.Windows.Controls.RichTextBox.dll
Syntax
public class UILayerStack : Object, ICollection<IUILayer>, IEnumerable<IUILayer>, IEnumerable
Constructors
UILayerStack()
Declaration
public UILayerStack()
Properties
Count
Gets the number of layers in the UI layer stack.
Declaration
public int Count { get; }
Property Value
System.Int32
|
IsReadOnly
Gets a value indicating whether the layer stack is read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean
|
Methods
AddAfter(String, IUILayer)
Adds a specified UI layer after a given layer identified by its name.
Declaration
public bool AddAfter(string presentedLayerName, IUILayer layer)
Parameters
System.String
presentedLayerName
The name of the layer after which the new layer will be added. |
IUILayer
layer
The UI layer to be added. |
Returns
System.Boolean
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
public bool AddBefore(string presentedLayerName, IUILayer layer)
Parameters
System.String
presentedLayerName
The name of the existing layer before which the new layer will be added. |
IUILayer
layer
The new UI layer to be added to the stack. |
Returns
System.Boolean
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
public void AddFirst(IUILayer layer)
Parameters
IUILayer
layer
The UI layer to be added to the stack. |
AddLast(IUILayer)
Adds a new layer to the end of the layer stack.
Declaration
public void AddLast(IUILayer layer)
Parameters
IUILayer
layer
The UI layer to be added to the stack. |
Clear()
Clears all layers from the UILayerStack, removing any elements currently present.
Declaration
public void Clear()
Contains(String)
Determines whether the specified string is contained within the UILayerStack.
Declaration
public bool Contains(string layerName)
Parameters
System.String
layerName
The name of the layer to search for in the UILayerStack. |
Returns
System.Boolean
True if the UILayerStack contains the specified layer; otherwise, false. |
Contains(IUILayer)
Determines whether the specified UI layer exists in the layer stack.
Declaration
public bool Contains(IUILayer layer)
Parameters
IUILayer
layer
The UI layer to locate in the layer stack. |
Returns
System.Boolean
True if the specified layer is found in the stack; otherwise, false. |
CopyTo(IUILayer[], Int32)
Copies the elements of the UILayerStack to a specified array, starting at a particular index.
Declaration
public void CopyTo(IUILayer[] array, int arrayIndex)
Parameters
IUILayer[]
array
The one-dimensional array that is the destination of the elements copied from the UILayerStack. |
System.Int32
arrayIndex
The zero-based index in the array at which storing the copied elements will begin. |
GetEnumerator()
Retrieves an enumerator that iterates through the elements of the UILayerStack.
Declaration
public IEnumerator<IUILayer> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<IUILayer>
An enumerator that provides access to the elements in the UILayerStack. |
GetLayerByName(String)
Retrieves a specific layer from the layer stack by its name.
Declaration
public IUILayer GetLayerByName(string layerName)
Parameters
System.String
layerName
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(String)
Removes the specified layer from the UILayerStack.
Declaration
public bool Remove(string layerName)
Parameters
System.String
layerName
The name of the layer to be removed. |
Returns
System.Boolean
Returns true if the layer was successfully removed; otherwise, false. |
Remove(IUILayer)
Removes the specified UI layer from the layer stack.
Declaration
public bool Remove(IUILayer layer)
Parameters
IUILayer
layer
The UI layer to be removed from the stack. |
Returns
System.Boolean
Returns true if the layer was successfully removed; otherwise, false. |