Export (0) Print
Expand All

ListView.CacheVirtualItems Event

Occurs when the contents of the display area for a ListView in virtual mode has changed, and the ListView determines that a new range of items is needed.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member CacheVirtualItems : IEvent<CacheVirtualItemsEventHandler,
    CacheVirtualItemsEventArgs>

This event only occurs when VirtualMode is true. Handling this event allows the ListView to update the item information held in the cache so that it is readily available. This can improve performance on large lists, or lists whose items are expensive to calculate.

For more information about handling events, see Handling and Raising Events.

The following code example demonstrates the use of this member. In the example, the event handler checks to make sure a cache refresh is really necessary, and then rebuilds the cache. This code example is part of a larger example provided for the VirtualMode property.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft