8 writes to _newItemIndex
PresentationFramework (8)
src\Framework\System\Windows\Data\ListCollectionView.cs (8)
766
_newItemIndex
= -2; // this is a signal that the next Add event comes from AddNew
812
_newItemIndex
= index;
1742
_newItemIndex
= SourceList.IndexOf(_newItem);
1787
++
_newItemIndex
;
1794
--
_newItemIndex
;
1815
_newItemIndex
= args.NewStartingIndex;
1819
--
_newItemIndex
;
1823
++
_newItemIndex
;
21 references to _newItemIndex
PresentationFramework (21)
src\Framework\System\Windows\Data\ListCollectionView.cs (21)
783
Debug.Assert(
_newItemIndex
!= -2 && System.Windows.Controls.ItemsControl.EqualsEx(newItem, _newItem), "AddNew did not raise expected events");
808
Debug.Assert(
_newItemIndex
== -2 && _newItem == NoNewItem, "unexpected call to BeginAddNew");
819
position = UsesLocalArray ? InternalCount - 1 :
_newItemIndex
;
867
fromIndex = UsesLocalArray ? InternalCount - 1 :
_newItemIndex
;
881
int toIndex = AdjustBefore(NotifyCollectionChangedAction.Add, newItem,
_newItemIndex
);
940
int newItemIndex =
_newItemIndex
;
975
SourceList.RemoveAt(
_newItemIndex
);
980
int index = AdjustBefore(NotifyCollectionChangedAction.Remove, _newItem,
_newItemIndex
);
1743
if (
_newItemIndex
< 0)
1753
if (args.Action == NotifyCollectionChangedAction.Add &&
_newItemIndex
== -2)
1785
if (IsAddingNew && args.NewStartingIndex <=
_newItemIndex
)
1792
if (IsAddingNew && args.OldStartingIndex <
_newItemIndex
)
1813
if (args.OldStartingIndex ==
_newItemIndex
)
1817
else if (args.OldStartingIndex <
_newItemIndex
&&
_newItemIndex
<= args.NewStartingIndex)
1821
else if (args.NewStartingIndex <=
_newItemIndex
&&
_newItemIndex
< args.OldStartingIndex)
2261
if (UsesLocalArray || index <=
_newItemIndex
)
2275
if (!UsesLocalArray && index >=
_newItemIndex
)
2603
if (IsAddingNew && k ==
_newItemIndex
)
2731
index >
_newItemIndex
)