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)
769Debug.Assert(_newItemIndex != -2 && System.Windows.Controls.ItemsControl.EqualsEx(newItem, _newItem), "AddNew did not raise expected events"); 794Debug.Assert(_newItemIndex == -2 && _newItem == NoNewItem, "unexpected call to BeginAddNew"); 805position = UsesLocalArray ? InternalCount - 1 : _newItemIndex; 853fromIndex = UsesLocalArray ? InternalCount - 1 : _newItemIndex; 867int toIndex = AdjustBefore(NotifyCollectionChangedAction.Add, newItem, _newItemIndex); 926int newItemIndex = _newItemIndex; 961SourceList.RemoveAt(_newItemIndex); 966int index = AdjustBefore(NotifyCollectionChangedAction.Remove, _newItem, _newItemIndex); 1728if (_newItemIndex < 0) 1738if (args.Action == NotifyCollectionChangedAction.Add && _newItemIndex == -2) 1770if (IsAddingNew && args.NewStartingIndex <= _newItemIndex) 1777if (IsAddingNew && args.OldStartingIndex < _newItemIndex) 1798if (args.OldStartingIndex == _newItemIndex) 1802else if (args.OldStartingIndex < _newItemIndex && _newItemIndex <= args.NewStartingIndex) 1806else if (args.NewStartingIndex <= _newItemIndex && _newItemIndex < args.OldStartingIndex) 2244if (UsesLocalArray || index <= _newItemIndex) 2258if (!UsesLocalArray && index >= _newItemIndex) 2584if (IsAddingNew && k == _newItemIndex) 2712index > _newItemIndex)