ListView.VirtualListSize Property

Gets or sets the number of ListViewItem objects contained in the list when in virtual mode.

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

public int VirtualListSize { get; set; }
/** @property */
public int get_VirtualListSize ()

/** @property */
public void set_VirtualListSize (int value)

public function get VirtualListSize () : int

public function set VirtualListSize (value : int)

Not applicable.

Property Value

The number of ListViewItem objects contained in the ListView when in virtual mode.

Exception typeCondition


VirtualListSize is set to a value less than 0.


VirtualMode is set to true, VirtualListSize is greater than 0, and RetrieveVirtualItem is not handled.

Getting or setting the VirtualListSize property when VirtualMode set to false will have no effect on the ListView.

If VirtualMode is set to true, and the VirtualListSize property is greater than 0, you must handle the RetrieveVirtualItem event, providing a valid ListViewItem.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0