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

Provides the base class from which the classes that represent pooled UI layers are derived. This class has object pool that stores UI elements that are not currently in use. This way they can be reused.

Definition

Constructors

Initializes a new instance of the PooledUILayer class.

C#
protected PooledUILayer()

Properties

Gets the value indicating if the UI element will be reused without removing from visual tree.

C#
protected virtual bool ReuseUIElementsWithoutRemovingFromVisualTree { get; }
Property Value:

The value indicating if the UI element will be reused without removing from visual tree.

Methods

Adds the element to pool.

C#
protected void AddElementToPool(object element)
Parameters:elementobject

The element.

Determines whether this instance can recycle the specified element.

C#
protected virtual bool CanRecycle(object element)
Parameters:elementobject

The element.

Returns:

bool

Tru if can recycle the element.

Clears this instance by removing all UI elements and returning them in the pool.

C#
public override void Clear()

Overrides: UILayer.Clear()

Gets the element from pool.

C#
protected T GetElementFromPool<T>() where T : class, new()
Returns:

T

The desired element.

Gets the element from pool.

C#
protected T GetElementFromPool<T>(ViewportPaneType paneType) where T : class, new()
Parameters:paneTypeViewportPaneTypeReturns:

T

The desired element.

Called when UI is updated.

C#
protected override void OnUIUpdated()

Overrides: UILayer.OnUIUpdated()

Resets the pooled element properties.

C#
protected virtual void ResetPooledElementProperties(object element)
Parameters:elementobject

The element.