A collection of ListItem objects for use with ListControl objects
Remarks: This is used to provide an easy way to add items to a ListControl. It is not mandatory to use this collection, however, since each control can specify bindings to your own model objects using ListControl.ItemKeyBinding, ListControl.ItemTextBinding, or other subclass bindings.
Constructors
ListItemCollection
#public ListItemCollection()
Initializes a new instance of the ListItemCollection class.
ListItemCollection
#Initializes a new instance of the ListItemCollection class with the specified collection.
Parameters:
| collection (IEnumerable<IListItem>) | Collection of items to populate this collection with |
Methods
Add
#Adds a new item to the list with the specified text
Parameters:
| text (string) | Text to display for the item. |
Parameters:
| items (IEnumerable<T>) | Items to add to the collection. |
Parameters:
| comparison (Comparison<T>) | Comparison for the sort. |
Parameters:
| comparer (IComparer<T>) | Comparer for the sort. |