Measures and arranges provider-backed items in a horizontal or vertical stack, realizing items as the available extent permits.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Type Parameters:
T
The type of item represented by each virtualized element.
Syntax:
public class VirtualizedStackContainer<T> : BaseVirtualizedContainer<T>, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode
Inheritance: objectDisposableObjectRadObjectRadElementLayoutPanelBaseVirtualizedContainer<T>VirtualizedStackContainer<T>...
Derived Classes:
Implements:
Inherited Members
Constructors
public VirtualizedStackContainer()
Fields
Properties
Gets the accumulated offset for items skipped before the first realized item.
public float ArtificialOffset { get; }
Gets the desired size accumulated during the current measure pass.
public SizeF CurrentDesiredSize { get; }
Gets or sets a value indicating whether the elements fit to size.
public bool FitElementsToSize { get; set; }
true if [fit elements to size]; otherwise, false.
Gets or sets the item spacing.
public int ItemSpacing { get; set; }
The item spacing.
Gets or sets the items orientation.
public Orientation Orientation { get; set; }
The orientation.
Gets the size originally available to the most recent measure pass, before scroll and artificial offsets are applied.
public SizeF OriginalAvailableSize { get; }
Gets the unconsumed size remaining after offsets and measured items are accounted for.
public SizeF RemainingAvailableSize { get; }
Gets or sets the scroll offset.
public SizeF ScrollOffset { get; set; }
The scroll offset.
Methods
Adds artificial offset on IsItemVisible when we want to use the method to hide the items which are above the top edge of the control (we hide them to improve the virtualization performance). The artificial offset will make the ArrangeOverride method start arranging items from their actual position, as if the hidden items were there.
Arranges the element in the proposed rectangle and returns that rectangle unchanged.
protected virtual RectangleF ArrangeElementCore(RadElement element, SizeF finalSize, RectangleF arrangeRect)
The realized element to arrange.
finalSizeSizeFThe final size allocated to the container.
arrangeRectRectangleFThe proposed bounds for the element.
Returns:The bounds reported for the element; the base implementation returns arrangeRect unchanged.
Arranges realized items along the configured orientation, using the scroll offset and item sizes supplied by the element provider.
Resets the size accumulators for a measure pass and initializes the stack offset.
Removes trailing item spacing from the accumulated size and limits the result to the original available size.
protected override SizeF EndMeasure()
The desired size of the stack container.
Overrides:
Sets the starting position from the scroll offset and adjusts the remaining measurement extent accordingly.
protected virtual void InitializeOffset()
Measures one realized item, updates the remaining and desired sizes along the stack axis, and determines whether to continue.
protected override bool MeasureElement(IVirtualizedElement<T> element)
The realized item to measure.
Returns:true when measurement should continue with another item; otherwise, false.
Overrides:
Measures an element using the size supplied by the element provider and the constraints set by FitElementsToSize.
protected virtual SizeF MeasureElementCore(RadElement element, SizeF availableSize)
The realized element to measure.
availableSizeSizeFThe remaining size available before provider-defined dimensions are applied.
Returns:The element's desired size after measurement.