New to Telerik UI for WinForms? Start a free 30-day trial

Hosts arbitrary UI elements in a named layer and positions associated elements from their layout boxes.

Definition

Namespace:Telerik.WinForms.Documents.UI.Layers

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class UIElementsLayer : IUILayer

Inheritance: objectUIElementsLayer

Derived Classes: TableMovementUILayer

Implements: IUILayer

Constructors

Initializes a layer and controls whether it updates for every viewport change.

C#
public UIElementsLayer(string name, bool shouldUpdateWhenNotInvalidated)
Parameters:namestring

The identifier used to find the layer in a UILayerStack.

shouldUpdateWhenNotInvalidatedbool

true to update even when the layer is not invalidated; otherwise, update only when required.

Initializes a layer with the specified lookup name and the default update behavior.

C#
public UIElementsLayer(string name)
Parameters:namestring

The identifier used to find the layer in a UILayerStack.

Fields

The canvas that hosts this layer's child visuals.

C#
public Canvas container

Properties

Gets the context supplied by the most recent viewport update.

C#
public UILayerUpdateContext CurrentUpdateContext { get; }

Gets or sets whether the hosted elements participate in hit testing.

C#
public bool IsHitTestVisible { get; set; }

Implements: IUILayer.IsHitTestVisible

Gets the name used to identify this layer in a UILayerStack.

C#
public virtual string Name { get; }

Implements: IUILayer.Name

Gets whether the layer is clipped by its container.

C#
public virtual bool ShouldClip { get; }

Implements: IUILayer.ShouldClip

Gets whether this layer updates on every viewport change even when it is not invalidated.

C#
public virtual bool ShouldUpdateWhenNotInvalidated { get; }

Implements: IUILayer.ShouldUpdateWhenNotInvalidated

Methods

Adds a visual to the layer's canvas.

C#
public void AddChild(UIElement uiElement)
Parameters:uiElementUIElement

The visual to add.

Repositions child visuals associated with layout boxes using the current view offset.

C#
public virtual void ArrangeChildren()

Implements: IUILayer.ArrangeChildren()

Calls ClearLayerOverride() and removes all child visuals from the canvas.

C#
public void ClearChildren()

Implements: IUILayer.ClearChildren()

Releases or resets layer-specific state before child visuals are cleared.

C#
protected virtual void ClearLayerOverride()

Notifies the layer that its presenter changed; the base implementation does nothing.

C#
public virtual void DoOnPresentationChanged()

Implements: IUILayer.DoOnPresentationChanged()

Gets the canvas that represents this layer in the presenter.

C#
public UIElement GetLayerUIElement()
Returns:

UIElement

The layer's hosting canvas.

Implements: IUILayer.GetLayerUIElement()

Stores the update context and invokes UpdateViewPortOverride(UILayerUpdateContext) for finite viewport dimensions.

C#
public void UpdateViewPort(UILayerUpdateContext context)
Parameters:contextUILayerUpdateContext

The current layer-update context.

Implements: IUILayer.UpdateViewPort(UILayerUpdateContext)

Performs layer-specific work for a finite viewport; override to update or create visuals.

C#
public virtual void UpdateViewPortOverride(UILayerUpdateContext context)
Parameters:contextUILayerUpdateContext

The current layer-update context.