[]
Represents a collection of tasks.
[ListBindable(true)]
public class TaskCollection : BaseCollection<Task>, ITypedList, IBindingList, IList, ICollection, IEnumerable, ICancelAddNew, IRaiseItemChangedEvents
| Name | Description |
|---|---|
| AllowEdit | Gets a value indicating whether items in the underlying list can be edited. |
| AllowNew | Gets whether you can add items to the list using AddNew. |
| AllowRemove | Gets whether you can remove items from the list, using Remove or RemoveAt. |
| NonEmptyTaskCount | Gets the number of non-empty tasks in the collection. |
| SupportsSorting | Gets a value indicating whether the list supports sorting. |
| Name | Description |
|---|---|
| Add(Task) | Adds a new Task object to the collection. If the item already exists in the collection, its index is returned. |
| AddNew() | Adds a new item to the list. |
| ApplySort(PropertyDescriptor, ListSortDirection) | Sorts the tasks. |
| BeginUpdate() | Begin updating collection. |
| CancelNew(int) | Discards a pending new item. |
| Clear() | Removes all tasks from the collection. |
| ClearAndDispose() | Removes all tasks from the collection, then disposes the tasks. |
| ClearItems() | Removes all items from the collection. |
| EndNew(int) | Commits a pending new item to the collection. |
| EndUpdate() | End updating collection. |
| IndexOf(int) | Searches for the specified ID and returns the zero-based index of the corresponding task. |
| IndexOf(string) | Searches for the specified Name and returns the zero-based index of the corresponding task. |
| InsertItem(int, Task) | Inserts an item at the specified index. |
| OnItemChanged(ItemEventArgs) | Handles the ItemChanged event. |
| OnItemDeleted(ItemEventArgs) | Handles the ItemDeleted event. |
| OnItemInserted(ItemEventArgs) | Handles the ItemInserted event. |
| OnListChanged(ListChangedEventArgs) | Raises the ListChanged event. |
| OriginalIndexOf(Task) | Returns the original zero-based index of the task. |
| RemoveItem(int) | Removes the item at the specified index. |
| RemoveSort() | Remove all sorts were applied to the tasks. |
| ResetBindings() | Causes a control bound to the collection to reread all the items in the list and refresh their displayed values. |
| ResetItem(int) | Causes a control bound to the collection to reread the item at the specified index, and refresh its displayed value. |
| Search(int) | Searches for a Task with the specified ID. |
| Search(string) | Searches for a Task with the specified Name. |
| SetItem(int, Task) | Replaces the item at the specified index. |
| Sort(PropertyDescriptor, ListSortDirection) | Sorts the tasks. |
| Name | Description |
|---|---|
| AddingNew | Occurs before an item is added to the underlying list. |
| ListChanged | Occurs when the list changes or an item in the list changes. |