Share via


ItemsWrapGrid.CacheLength Property

Definition

Gets or sets the size of the buffers for items outside the viewport, in multiples of the viewport size.

public:
 property double CacheLength { double get(); void set(double value); };
double CacheLength();

void CacheLength(double value);
public double CacheLength { get; set; }
var double = itemsWrapGrid.cacheLength;
itemsWrapGrid.cacheLength = double;
Public Property CacheLength As Double
ItemsWrapGrid CacheLength="double" />

Property Value

Double

double

The size of the buffers for items outside the viewport, in multiples of the viewport size. The default is 4.0.

Remarks

To improve scrolling performance, ItemsWrapGrid creates and caches item containers for items that are off-screen on both sides of the viewport. The CacheLength property specifies the size of the buffers for the off-screen items. You specify CacheLength in multiples of the current viewport size. For example, if the CacheLength is 4.0, 2 viewports worth of items are buffered on each side of the viewport.

You can set a smaller cache length to optimize startup time, or set a larger cache size to optimize scrolling performance. Item containers that are off-screen are created at a lower priority than those in the viewport.

Applies to