开发者

Getting C# listview to show thumbnails only when needed

开发者 https://www.devze.com 2022-12-11 17:09 出处:网络
I wanted to make the listview show thumbnails only when the items are visible on the screen. Is there a way to do开发者_运维百科 this?See an excellent implementation of what your after on CodeProjectY

I wanted to make the listview show thumbnails only when the items are visible on the screen. Is there a way to do开发者_运维百科 this?


See an excellent implementation of what your after on CodeProject


You can do this by using a ListView in virtual mode, and then adding your generated thumbnails to the LargeImageList during the RetrieveVirtualItem event (if they are not already there).

If you wanted most of the work done for you, you could use a FastObjectListView from the ObjectListView project (an open source wrapper around .NET WinForms ListView) and then follow this recipe on how to use images loaded from a database. Your images, of course, would be thumbnails created from the source rather than images from a database but the logic is the same.

0

精彩评论

暂无评论...
验证码 换一张
取 消