Click or drag to resize

CollectionChangedHandlerTItem, TCollection Class

Class to help implement collection changed events on a data store
Inheritance Hierarchy

Namespace:  Eto
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public abstract class CollectionChangedHandler<TItem, TCollection>
where TCollection : class

Type Parameters

TItem
Type of the items in the collection
TCollection
Type of the collection

The CollectionChangedHandlerTItem, TCollection type exposes the following members.

Constructors
  NameDescription
Protected methodCollectionChangedHandlerTItem, TCollection
Initializes a new instance of the CollectionChangedHandlerTItem, TCollection class
Top
Properties
  NameDescription
Public propertyCollection
Gets the collection that this handler is observing
Public propertyCount
Gets the count of the items in the current registered collection.
Top
Methods
  NameDescription
Public methodAddItem
Adds the item to the end of the collection
Public methodAddRange
Adds multiple items to the end of the collection
Public methodElementAt
Gets the element at the specified index of the current registered collection.
Public methodIndexOf
Gets the index of the specified item
Public methodInsertItem
Inserts an item at the specified index in the collection
Public methodInsertRange
Inserts multiple items to the specified index in the collection
Protected methodInternalElementAt
Gets the element at the specified index.
Protected methodInternalIndexOf
Gets the index of the item from the collection
Protected methodOnRegisterCollection
Called when the object has been registered (attached) to a collection
Protected methodOnUnregisterCollection
Called when the object has unregistered the collection
Public methodRegister
Registers a specific collection to observe
Public methodRemoveAllItems
Removes all items from the collection
Public methodRemoveItem(Int32)
Removes the item at the specified index
Public methodRemoveItem(TItem)
Removes the specified item
Public methodRemoveRange(IEnumerableTItem)
Removes the specified items from the collection
Public methodRemoveRange(Int32, Int32)
Removes a specified count of items from the collection starting at the specified index
Public methodReset
Resets the collection when it is dramatically changed
Public methodUnregister
Unregisters the current registered collection
Top
Remarks
This is used for the platform handler of controls that use collections. This class helps detect changes to a collection so that the appropriate action can be taken to update the UI with the changes. This is a simple helper that is much easier to implement than handling the CollectionChanged event directly.
See Also

Reference