ItemsStackPanel.CacheLength ItemsStackPanel.CacheLength ItemsStackPanel.CacheLength ItemsStackPanel.CacheLength Property

Definition

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

public : double CacheLength { get; set; }
double CacheLength();

void CacheLength(double cachelength);
public double CacheLength { get; set; }
Public ReadWrite Property CacheLength As double
ItemsStackPanel 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, ItemsStackPanel 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.