C# Virtual List View in WinForms

后端 未结 1 829
-上瘾入骨i
-上瘾入骨i 2020-12-22 00:46

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?

相关标签:
1条回答
  • 2020-12-22 01:19

    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

    0 讨论(0)
提交回复
热议问题