using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Util { public interface INotifyCollectionChanged { event NotifyCollectionChangedEventHandler CollectionChanged; } public delegate void NotifyCollectionChangedEventHandler( object sender, NotifyCollectionChangedEventArgs e ); public class NotifyCollectionChangedEventArgs : EventArgs { //start with something simple T objectChanged; NotifyCollectionChangedAction action; public NotifyCollectionChangedEventArgs(T change, NotifyCollectionChangedAction action) { this.objectChanged = change; this.action = action; } public NotifyCollectionChangedAction Action { get { return action; } set { action = value; } } public T ObjectChanged { get { return objectChanged; } } } public enum NotifyCollectionChangedAction { Add,//One or more items were added to the collection. Remove, //One or more items were removed from the collection. Replace,//One or more items were replaced in the collection. Move,//One or more items were moved within the collection. Reset } }