PRB: Setting the LargeImageList Property of the ListView Control at Runtime Causes Rearrangement of ListView Items (813571)
The information in this article applies to:
- Microsoft .NET Compact Framework
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Basic .NET (2003)
- Microsoft Visual C# .NET (2003)
SYMPTOMSWhen you set the LargeImageList property of the ListView control to an existing ImageList during runtime, the items in the ListView control may become rearranged.WORKAROUNDTo work around this problem, set the LargeImageList property to an ImageList before you add the items to ListView. If
you want to change the LargeImageList property to another ImageList,
follow these steps: - Remove all the items in the ListView control.
- Assign ImageList to the LargeImageList property.
- Repopulate ListView.
Sample CodeVisual C# .NET this.listView1.Items.Clear();
this.listView1.LargeImageList = this.largeImg;
this.listView1.Items.Add(new ListViewItem("Item 1"));
Visual Basic .NET Me.listView1.Items.Clear()
Me.listView1.LargeImageList = Me.largeImg
listView1.Items.Add(New ListViewItem("Item 1"))
STATUS This
behavior is by design.REFERENCES For additional
information, click the following article number to view the article in the
Microsoft Knowledge Base: 813562
PRB: Deployment on an Emulator Does Not Respond When You Select the COM1 Port in the Configure Emulator Settings Window
Smart Devices 1.0:10086
Modification Type: | Minor | Last Reviewed: | 5/20/2005 |
---|
Keywords: | kbListView kbControl kbProperties kblayout kbprb KB813571 kbAudDeveloper |
---|
|