8 writes to _newItemIndex
PresentationFramework (8)
System\Windows\Data\ListCollectionView.cs (8)
752
_newItemIndex
= -2; // this is a signal that the next Add event comes from AddNew
798
_newItemIndex
= index;
1727
_newItemIndex
= SourceList.IndexOf(_newItem);
1772
++
_newItemIndex
;
1779
--
_newItemIndex
;
1800
_newItemIndex
= args.NewStartingIndex;
1804
--
_newItemIndex
;
1808
++
_newItemIndex
;
21 references to _newItemIndex
PresentationFramework (21)
System\Windows\Data\ListCollectionView.cs (21)
769
Debug.Assert(
_newItemIndex
!= -2 && System.Windows.Controls.ItemsControl.EqualsEx(newItem, _newItem), "AddNew did not raise expected events");
794
Debug.Assert(
_newItemIndex
== -2 && _newItem == NoNewItem, "unexpected call to BeginAddNew");
805
position = UsesLocalArray ? InternalCount - 1 :
_newItemIndex
;
853
fromIndex = UsesLocalArray ? InternalCount - 1 :
_newItemIndex
;
867
int toIndex = AdjustBefore(NotifyCollectionChangedAction.Add, newItem,
_newItemIndex
);
926
int newItemIndex =
_newItemIndex
;
961
SourceList.RemoveAt(
_newItemIndex
);
966
int index = AdjustBefore(NotifyCollectionChangedAction.Remove, _newItem,
_newItemIndex
);
1728
if (
_newItemIndex
< 0)
1738
if (args.Action == NotifyCollectionChangedAction.Add &&
_newItemIndex
== -2)
1770
if (IsAddingNew && args.NewStartingIndex <=
_newItemIndex
)
1777
if (IsAddingNew && args.OldStartingIndex <
_newItemIndex
)
1798
if (args.OldStartingIndex ==
_newItemIndex
)
1802
else if (args.OldStartingIndex <
_newItemIndex
&&
_newItemIndex
<= args.NewStartingIndex)
1806
else if (args.NewStartingIndex <=
_newItemIndex
&&
_newItemIndex
< args.OldStartingIndex)
2244
if (UsesLocalArray || index <=
_newItemIndex
)
2258
if (!UsesLocalArray && index >=
_newItemIndex
)
2584
if (IsAddingNew && k ==
_newItemIndex
)
2712
index >
_newItemIndex
)