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

Creates virtualized elements of a fixed type and reuses cached instances that are compatible with the requested item and context.

Definition

Constructors

C#
public VirtualizedPanelElementProvider()

Methods

Creates a new element without attaching the requested data or context; attachment is the caller's responsibility.

C#
public override IVirtualizedElement<T> CreateElement(T data, object context)
Parameters:dataT

The item for which an element is requested.

contextobject

The context in which the element will be used.

Returns:

IVirtualizedElement<T>

A new instance of T1.

Overrides: BaseVirtualizedElementProvider<T>.CreateElement(T, object)

Determines whether an existing element should be updated by comparing its current data with the requested item.

C#
public override bool ShouldUpdate(IVirtualizedElement<T> element, T data, object context)
Parameters:elementIVirtualizedElement<T>

The element currently representing an item.

dataT

The item the element is requested to represent.

contextobject

The context; this implementation does not use it when deciding whether to update.

Returns:

bool

true when element's current data is not equal to data; otherwise, false.

Overrides: BaseVirtualizedElementProvider<T>.ShouldUpdate(IVirtualizedElement<T>, T, object)