C# Virtual List View in WinForms

2019-09-21 19:53发布

I am new to a virtual list item and how it works. Can you explain the uses and when it is appropriate to use. Can it be used with word document text files, excel document? How does it pull the information and is there any samples that would be useful with a List Item: Detail Mode? I have no clue how to start the program any help is appreciated.

1条回答
Luminary・发光体
2楼-- · 2019-09-21 20:34

Basically the virtual list control lets you have a listbox with a very large number of items in it but only load a subset of the data into memory. As the user scrolls through the list and exhausts the items in memory then the list control loads more data:

http://msdn.microsoft.com/en-us/library/ye4z8x58.aspx

The .NET version is implemented with the 'VirtualMode' property of the ListView control. When this is set to true it will act as a virtual list. Your code handles the "RetrieveVirtualItem" event to load more data into the list view as the virtual list's items are exhausted:

http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.virtualmode(v=vs.110).aspx

查看更多
登录 后发表回答