155 references to ListChangedType
netstandard (1)
netstandard.cs (1)
371[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.ListChangedType))]
PresentationFramework (10)
System\Windows\Data\BindingListCollectionView.cs (10)
1905if (_ignoreInnerRefresh && (args.ListChangedType == ListChangedType.Reset)) 1915case ListChangedType.ItemAdded: 1947case ListChangedType.ItemDeleted: 1980case ListChangedType.ItemMoved: 2011case ListChangedType.ItemChanged: 2024goto case ListChangedType.Reset; 2028case ListChangedType.Reset: 2030case ListChangedType.PropertyDescriptorAdded: 2031case ListChangedType.PropertyDescriptorChanged: 2032case ListChangedType.PropertyDescriptorDeleted:
System (1)
src\libraries\shims\System\ref\System.cs (1)
357[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.ListChangedType))]
System.ComponentModel.TypeConverter (18)
System\ComponentModel\BindingList.cs (13)
107FireListChanged(ListChangedType.Reset, -1); 116FireListChanged(ListChangedType.Reset, -1); 158public void ResetBindings() => FireListChanged(ListChangedType.Reset, -1); 162FireListChanged(ListChangedType.ItemChanged, position); 166private void FireListChanged(ListChangedType type, int index) 194FireListChanged(ListChangedType.Reset, -1); 209FireListChanged(ListChangedType.ItemAdded, index); 228FireListChanged(ListChangedType.ItemDeleted, index); 247FireListChanged(ListChangedType.ItemChanged, index); 348FireListChanged(ListChangedType.Reset, -1); 363FireListChanged(ListChangedType.Reset, -1); 378FireListChanged(ListChangedType.Reset, -1); 526ListChangedEventArgs args = new ListChangedEventArgs(ListChangedType.ItemChanged, pos, pd);
System\ComponentModel\ListChangedEventArgs.cs (5)
11public ListChangedEventArgs(ListChangedType listChangedType, int newIndex) : this(listChangedType, newIndex, -1) 15public ListChangedEventArgs(ListChangedType listChangedType, int newIndex, PropertyDescriptor? propDesc) : this(listChangedType, newIndex) 21public ListChangedEventArgs(ListChangedType listChangedType, PropertyDescriptor? propDesc) 27public ListChangedEventArgs(ListChangedType listChangedType, int newIndex, int oldIndex) 34public ListChangedType ListChangedType { get; }
System.Data.Common (62)
System\Data\DataView.cs (36)
56internal static readonly ListChangedEventArgs s_resetEventArgs = new ListChangedEventArgs(ListChangedType.Reset, -1); 507OnListChanged(new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, new DataTablePropertyDescriptor(_table))); 555OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, IndexOf(drv))); 815OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, Count)); 1246if (ListChangedType.Reset != e.ListChangedType) 1256if (ListChangedType.Reset == e.ListChangedType) 1266if ((ListChangedType.ItemAdded == e.ListChangedType) && (null != _addNewMoved)) 1285internal void MaintainDataView(ListChangedType changedType, DataRow? row, bool trackAddRemove) 1290case ListChangedType.ItemAdded: 1308_addNewMoved = new ListChangedEventArgs(ListChangedType.ItemMoved, index, Count - 1); 1319case ListChangedType.ItemDeleted: 1341case ListChangedType.Reset: 1345case ListChangedType.ItemChanged: 1346case ListChangedType.ItemMoved: 1348case ListChangedType.PropertyDescriptorAdded: 1349case ListChangedType.PropertyDescriptorChanged: 1350case ListChangedType.PropertyDescriptorDeleted: 1368case ListChangedType.ItemChanged: 1373case ListChangedType.ItemMoved: 1376Debug.Assert(((ListChangedType.ItemChanged == e.ListChangedType) && ((e.NewIndex == e.OldIndex) || (-1 == e.OldIndex))) || 1377(ListChangedType.ItemMoved == e.ListChangedType && (e.NewIndex != e.OldIndex) && (0 <= e.OldIndex)), 1393case ListChangedType.ItemAdded: 1394case ListChangedType.ItemDeleted: 1395case ListChangedType.PropertyDescriptorAdded: 1396case ListChangedType.PropertyDescriptorChanged: 1397case ListChangedType.PropertyDescriptorDeleted: 1398case ListChangedType.Reset: 1636e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 1637e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp) : 1638e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 1647e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 1648e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp) : 1649e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 1658e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataColumnPropertyDescriptor((System.Data.DataColumn)e.Element!)) : 1659e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp) : 1660e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataColumnPropertyDescriptor((System.Data.DataColumn)e.Element!)) :
System\Data\DataViewListener.cs (1)
68internal void MaintainDataView(ListChangedType changedType, DataRow? row, bool trackAddRemove)
System\Data\DataViewManager.cs (6)
334e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataTablePropertyDescriptor((System.Data.DataTable)e.Element!)) : 335e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp) : 336e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataTablePropertyDescriptor((System.Data.DataTable)e.Element!)) : 345e.Action == CollectionChangeAction.Add ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorAdded, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) : 346e.Action == CollectionChangeAction.Refresh ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, NullProp) : 347e.Action == CollectionChangeAction.Remove ? new ListChangedEventArgs(ListChangedType.PropertyDescriptorDeleted, new DataRelationPropertyDescriptor((System.Data.DataRelation)e.Element!)) :
System\Data\Selection.cs (19)
421MaintainDataView(ListChangedType.ItemDeleted, record, !fireEvent); 425OnListChanged(ListChangedType.ItemDeleted, recordIndex); 802MaintainDataView(ListChangedType.ItemAdded, record, !fireEvent); 808OnListChanged(ListChangedType.ItemAdded, _records.GetIndexByNode(nodeId)); 840private void OnListChanged(ListChangedType changedType, int newIndex, int oldIndex) 848private void OnListChanged(ListChangedType changedType, int index) 868private void MaintainDataView(ListChangedType changedType, int record, bool trackAddRemove) 873delegate (DataViewListener listener, ListChangedType type, DataRow? row, bool track) 883MaintainDataView(ListChangedType.Reset, -1, false); 895OnListChanged(ListChangedType.ItemChanged, index); 910OnListChanged(ListChangedType.ItemChanged, newIndex, oldIndex); 915OnListChanged(ListChangedType.ItemAdded, newIndex, oldIndex); 919OnListChanged(ListChangedType.ItemDeleted, oldIndex); 923OnListChanged(ListChangedType.ItemMoved, newIndex, oldIndex); 965OnListChanged(ListChangedType.ItemChanged, commonIndexLocation, commonIndexLocation); 984OnListChanged(ListChangedType.ItemChanged, newRecordIndex, oldRecordIndex); // be carefull remove oldrecord index if needed 990MaintainDataView(ListChangedType.ItemAdded, newRecord, false); 991OnListChanged(ListChangedType.ItemAdded, GetIndex(newRecord)); // oldLocation would be -1 995OnListChanged(ListChangedType.ItemMoved, newRecordIndex, oldRecordIndex);
System.Windows.Forms (60)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (15)
334if (e.ListChangedType != ListChangedType.Reset) 371if (e.ListChangedType is ListChangedType.PropertyDescriptorAdded 372or ListChangedType.PropertyDescriptorDeleted 373or ListChangedType.PropertyDescriptorChanged) 415if (e.ListChangedType == ListChangedType.ItemAdded) 449else if (e.ListChangedType == ListChangedType.ItemDeleted) 493if (e.ListChangedType == ListChangedType.ItemAdded 521if (e.ListChangedType == ListChangedType.ItemDeleted) 567case ListChangedType.Reset: 595case ListChangedType.ItemAdded: 609case ListChangedType.ItemDeleted: 613case ListChangedType.ItemMoved: 622case ListChangedType.ItemChanged: 667MatchCurrencyManagerPosition(scrollIntoView: false, clearSelection: e.ListChangedType == ListChangedType.Reset); 800_owner.OnDataBindingComplete(ListChangedType.Reset);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (4)
11483OnDataBindingComplete(ListChangedType.Reset); 14594internal void OnDataBindingComplete(ListChangedType listChangedType) => 14882OnDataBindingComplete(ListChangedType.Reset); 14894OnDataBindingComplete(ListChangedType.Reset);
System\Windows\Forms\Controls\DataGridView\DataGridViewBindingCompleteEventArgs.cs (2)
10public DataGridViewBindingCompleteEventArgs(ListChangedType listChangedType) 15public ListChangedType ListChangedType { get; }
System\Windows\Forms\DataBinding\BindingSource.cs (14)
766OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index)); 783private void OnSimpleListChanged(ListChangedType listChangedType, int newIndex) 1039OnListChanged(new ListChangedEventArgs(ListChangedType.PropertyDescriptorChanged, null)); 1042OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1)); 1047OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, Position)); 1052OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, itemIndex)); 1483OnSimpleListChanged(ListChangedType.ItemAdded, ret); 1491OnSimpleListChanged(ListChangedType.Reset, -1); 1501OnSimpleListChanged(ListChangedType.ItemAdded, index); 1510OnSimpleListChanged(ListChangedType.ItemDeleted, index); 1518OnSimpleListChanged(ListChangedType.ItemDeleted, index); 1531OnSimpleListChanged(ListChangedType.ItemChanged, index); 1583OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, saveAddNew)); 1665OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
System\Windows\Forms\DataBinding\CurrencyManager.cs (25)
181OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1, -1)); 316OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, Position)); 625if (e.ListChangedType == ListChangedType.ItemMoved && e.OldIndex < 0) 627dbe = new ListChangedEventArgs(ListChangedType.ItemAdded, e.NewIndex, e.OldIndex); 629else if (e.ListChangedType == ListChangedType.ItemMoved && e.NewIndex < 0) 631dbe = new ListChangedEventArgs(ListChangedType.ItemDeleted, e.OldIndex, e.NewIndex); 654if (dbe.ListChangedType == ListChangedType.Reset && e.NewIndex == -1) 660if (dbe.ListChangedType == ListChangedType.ItemDeleted) 667if (e.ListChangedType is ListChangedType.PropertyDescriptorAdded or 668ListChangedType.PropertyDescriptorDeleted or 669ListChangedType.PropertyDescriptorChanged) 683case ListChangedType.Reset: 696case ListChangedType.ItemAdded: 737case ListChangedType.ItemDeleted: 762case ListChangedType.ItemChanged: 771case ListChangedType.ItemMoved: 787case ListChangedType.PropertyDescriptorAdded: 788case ListChangedType.PropertyDescriptorDeleted: 789case ListChangedType.PropertyDescriptorChanged: 952List_ListChanged(_list, new ListChangedEventArgs(ListChangedType.Reset, -1)); 1041case ListChangedType.ItemDeleted: 1048case ListChangedType.Reset: 1051case ListChangedType.ItemAdded: 1058case ListChangedType.ItemMoved: 1065case ListChangedType.ItemChanged:
System.Windows.Forms.Tests (3)
System\Windows\Forms\DataGridViewBindingCompleteEventArgsTests.cs (3)
12[InlineData(ListChangedType.ItemAdded)] 13[InlineData(ListChangedType.Reset - 1)] 14public void Ctor_ListChangedType(ListChangedType listChangedType)