Posted 8 May 2018, 12:51 pm EST
I have a treeview that uses custom ButtonImageList/CheckImageList (to display properly sized expand/contract and checkbox in a high dpi environment) that redraws much slower than the same treeview without the custom imagelists.
I have to believe the bottleneck is in using a listview to retrieve the images rather than simply exposing an image property for each one of the expand and checked states. The treeview uses a custom CustomContentPresenter which draws images (not from a listview VERY quickly).
Is there anyway to set the default expand/contract and checked images directly?
As an aside, directly setting images in a ribbon menu is significantly faster than linking the control to a imageList. It must be either some slowdown in the way you retrieve the images from the imagelist, or a basic weakness in the imagelist class itself.