.Net: Inserting with index in a ListView in LargeIcon mode don't display inserted items in right position
If i try
ListView1.Sorting = SortOrder.None
List开发者_Go百科View1.ListViewItemSorter = Nothing
ListView1.Items.Insert(0, "0")
ListView1.Items.Insert(1, "1")
ListView1.Items.Insert(0, "2")
ListView1.Items.Insert(1, "3")
If ListView1.View is SmallIcon , LargeIcon or Tile it dont work (Display 0 1 2 3). If it's in List it works (Display desired 2 3 0 1).
Ok, got it myself. Apparently this is a bug in MS ListView, the workaround is resetting the Alignment, forcing a refresh:
ListView1.Alignment = ListViewAlignment.Default
ListView1.Alignment = ListViewAlignment.Top
精彩评论