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