This is an unusual thing, but the .NET ListView wrapper won't handle it. You can try to recreate your own Windows control before reset. Not sure if this will have side effects, you will have to try it. Add a new class to your project and paste the code shown below. Compilation. Drop the new control on top of the toolbar, replacing the original.
using System;
using System.Windows.Forms;
class MyListView : ListView {
public new ImageList SmallImageList {
get { return base.SmallImageList; }
set {
base.SmallImageList = value;
if (value == null && base.IsHandleCreated) this.RecreateHandle();
}
}
}
source
share