Listview - menu for switching item
I'd like to add an option to my ListView, so that I can change it's view (tile, list, details,...) - just like in Windows Explorer. How can I build such a menu? With PictureBox and MenuStrip?
alt text http://img689.imageshack.us/img689/6792/temprt.jpg
PS: winforms, not WPF
Thank开发者_开发知识库s!
Set its ContextMenuStrip property. Choosing Details does require you to add Columns.
How I did it:
- I created new user control and added a button with this icon.
- Then I added ContextMenu with all five items.
- Button.OnClick shows ContextMenu
- Added public event for ItemClicked with parameter View
- Added public property for selected view
精彩评论