Update of Clone in ContainerListViewItem
Brought to you by:
tamc
I have hit some issues where the SubItem collection is empty. If you move from using the Index directly to Insert it works.
/// <summary>
/// Creates a copy of this <see cref="ContainerListViewItem"/> that is not attached to a list.
/// </summary>
/// <returns></returns>
public object Clone()
{
ContainerListViewItem lvi = new ContainerListViewItem();
lvi._backColor = _backColor;
lvi._font = _font;
lvi._foreColor = _foreColor;
lvi._imageIndex = _imageIndex;
lvi._selectedImageIndex = _selectedImageIndex;
lvi._listView = _listView;
lvi._tag = _tag;
for(int index = 0; index < _subItems.Count; ++index)
lvi._subItems.Insert(index,_subItems[index].Clone());
return lvi;
}