DekGenius.com
[ Team LiB ] Previous Section Next Section

CollectionChangeEventArgs

System.ComponentModel (system.dll)class

This class encapsulates the data for the various CollectionChanged events raised by the collection classes in the System.Data namespace, such as the System.Data.DataTableCollection and System.Data.DataColumnCollection.

You can determine how the collection changed using the Action property, and which value actually changed with Element.

Although this class is present to support the data-binding framework, there is no reason you cannot use it in your own notifying collection classes.

public class CollectionChangeEventArgs : EventArgs {
// Public Constructors
   public CollectionChangeEventArgs(CollectionChangeAction action, object element);
// Public Instance Properties
   public virtual CollectionChangeAction Action{get; }
   public virtual object Element{get; }
}

Hierarchy

System.Object System.EventArgs CollectionChangeEventArgs

Passed To

CollectionChangeEventHandler.{BeginInvoke(), Invoke()}, System.Windows.Forms.BindingContext.OnCollectionChanged( ), System.Windows.Forms.BindingsCollection.OnCollectionChanged( ), System.Windows.Forms.GridColumnStylesCollection.OnCollectionChanged( ), System.Windows.Forms.GridTableStylesCollection.OnCollectionChanged( )

    [ Team LiB ] Previous Section Next Section