196 references to OldStartingIndex
Microsoft.Maui.Controls (107)
BindableLayout\BindableLayout.cs (1)
511 var index = e.OldStartingIndex;
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (10)
560 if (e.NewStartingIndex > lastIndex || e.OldStartingIndex > lastIndex) 562 $"Index '{Math.Max(e.NewStartingIndex, e.OldStartingIndex)}' is greater than the number of rows '{lastIndex}'."); 576 if (e.OldStartingIndex == -1 || groupReset) 579 DeleteRows(e.OldStartingIndex, e.OldItems.Count, section); 587 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1 || groupReset) 590 MoveRows(e.NewStartingIndex, e.OldStartingIndex, e.OldItems.Count, section); 592 if (e.OldStartingIndex == 0) 598 if (e.OldStartingIndex == -1 || groupReset) 601 ReloadRows(e.OldStartingIndex, e.OldItems.Count, section); 603 if (e.OldStartingIndex == 0)
Compatibility\Handlers\Shell\iOS\ShellSearchResultsRenderer.cs (7)
199 if (e.OldStartingIndex == -1) 202 TableView.DeleteRows(GetPaths(section, e.OldStartingIndex, e.OldItems.Count), DeleteRowsAnimation); 208 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1) 213 var oldIndex = e.OldStartingIndex; 216 if (e.NewStartingIndex < e.OldStartingIndex) 228 if (e.OldStartingIndex == -1) 231 TableView.ReloadRows(GetPaths(section, e.OldStartingIndex, e.OldItems.Count), ReloadRowsAnimation);
Compatibility\Handlers\Shell\iOS\ShellSectionRootRenderer.cs (1)
518 if (e.OldStartingIndex < _currentIndex)
Handlers\Items\iOS\CarouselViewController.cs (1)
320 _positionAfterUpdate = GetPositionWhenRemovingItems(e.OldStartingIndex, carouselPosition, currentItemPosition, count);
Handlers\Items\iOS\ObservableGroupedSource.cs (4)
249 var startIndex = args.OldStartingIndex; 306 Update(() => _collectionView.MoveSection(args.OldStartingIndex, args.NewStartingIndex)); 310 var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex); 311 var end = Math.Max(args.OldStartingIndex, args.NewStartingIndex) + count;
Handlers\Items\iOS\ObservableItemsSource.cs (5)
187 var startIndex = args.OldStartingIndex; 214 var startIndex = args.OldStartingIndex; 255 var oldPath = NSIndexPath.Create(_section, args.OldStartingIndex); 262 var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex); 263 var end = Math.Max(args.OldStartingIndex, args.NewStartingIndex) + count;
Handlers\Items2\iOS\CarouselViewController2.cs (1)
240 _positionAfterUpdate = GetPositionWhenRemovingItems(e.OldStartingIndex, carouselPosition, currentItemPosition, count);
Internals\NotifyCollectionChangedEventArgsExtensions.cs (11)
48 if (self.NewStartingIndex < 0 || self.OldStartingIndex < 0) 52 removeAt(self.OldItems[i], self.OldStartingIndex); 55 if (self.OldStartingIndex < self.NewStartingIndex) 64 if (self.OldStartingIndex < 0) 68 removeAt(self.OldItems[i], self.OldStartingIndex); 72 if (self.OldStartingIndex < 0 || self.OldItems.Count != self.NewItems.Count) 77 removeAt(self.OldItems[i], i + self.OldStartingIndex); 78 insert(self.NewItems[i], i + self.OldStartingIndex, true); 99 return new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Remove, e.OldItems, e.OldStartingIndex); 102 return new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Move, e.OldItems, e.NewStartingIndex, e.OldStartingIndex); 105 return new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Replace, e.NewItems, e.OldItems, e.OldStartingIndex);
Items\MarshalingObservableCollection.cs (4)
96 var toMove = this[args.OldStartingIndex]; 97 RemoveAt(args.OldStartingIndex); 106 var startIndex = args.OldStartingIndex + args.OldItems.Count - 1; 107 for (int n = startIndex; n >= args.OldStartingIndex; n--)
LegacyLayouts\Layout.cs (1)
635 OnInternalRemoved(v, e.OldStartingIndex + i);
MultiPage.cs (14)
244 if (e.OldStartingIndex < 0) 247 int removeIndex = e.OldStartingIndex; 253 Element element = InternalChildren[e.OldStartingIndex]; 254 InternalChildren.RemoveAt(e.OldStartingIndex); 261 if (e.NewStartingIndex < 0 || e.OldStartingIndex < 0) 264 if (e.NewStartingIndex == e.OldStartingIndex) 267 bool movingForward = e.OldStartingIndex < e.NewStartingIndex; 271 int moveIndex = e.OldStartingIndex; 277 for (var i = 0; i < e.OldStartingIndex - e.NewStartingIndex; i++) 285 InternalChildren.RemoveAt(e.OldStartingIndex); 301 if (e.OldStartingIndex < 0) 304 for (int i = e.OldStartingIndex; i - e.OldStartingIndex < e.OldItems.Count; i++) 310 T page = _templatedItems.GetOrCreateContent(i, e.NewItems[i - e.OldStartingIndex]);
ObservableWrapper.cs (5)
192 if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1) 199 int outerOldIndex = ToOuterIndex(e.OldStartingIndex); 204 if (e.OldStartingIndex == -1 || e.OldItems.Count > 1) 211 int outerRemovedIndex = ToOuterIndex(e.OldStartingIndex); 216 if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1)
Picker\Picker.cs (3)
324 if (e.OldStartingIndex < Items.Count) 327 removeStart = e.OldStartingIndex; 328 index = e.OldStartingIndex + e.OldItems.Count - 1;
Shell\ShellContent.cs (1)
335 OnChildRemoved(el, e.OldStartingIndex + i);
Shell\ShellItem.cs (1)
322 OnChildRemoved(element, e.OldStartingIndex + i);
TemplatedItemsList.cs (37)
820 if (e.OldStartingIndex == -1) 823 int removeIndex = e.OldStartingIndex; 830 int index = e.OldStartingIndex; 839 OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, oldItems, e.OldStartingIndex)); 844 if (e.OldStartingIndex == -1) 852 int index = e.OldStartingIndex + i; 865 OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, newItems, oldItems, e.OldStartingIndex)); 870 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1) 873 bool movingForward = e.OldStartingIndex < e.NewStartingIndex; 877 int moveIndex = e.OldStartingIndex; 883 for (var i = 0; i < e.OldStartingIndex - e.NewStartingIndex; i++) 894 oldItems.Add(_groupedItems[e.OldStartingIndex]); 896 _templatedObjects.RemoveAt(e.OldStartingIndex); 897 _groupedItems.RemoveAt(e.OldStartingIndex); 901 if (e.OldStartingIndex < e.NewStartingIndex) 912 OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, oldItems, e.OldStartingIndex, e.NewStartingIndex)); 1001 if (e.OldStartingIndex >= 0 && e.OldItems != null) 1002 maxindex = Math.Max(maxindex, e.OldStartingIndex + e.OldItems.Count); 1027 if (e.NewStartingIndex < 0 || e.OldStartingIndex < 0) 1030 bool movingForward = e.OldStartingIndex < e.NewStartingIndex; 1034 int moveIndex = e.OldStartingIndex; 1040 for (var i = 0; i < e.OldStartingIndex - e.NewStartingIndex; i++) 1048 TItem[] itemsToMove = _templatedObjects.Skip(e.OldStartingIndex).Take(e.OldItems.Count).ToArray(); 1050 _templatedObjects.RemoveRange(e.OldStartingIndex, e.OldItems.Count); 1055 e = new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Move, itemsToMove, e.NewStartingIndex, e.OldStartingIndex); 1059 if (e.OldStartingIndex >= 0) 1061 int removeIndex = e.OldStartingIndex; 1068 TItem item = _templatedObjects[e.OldStartingIndex + i]; 1076 _templatedObjects.RemoveRange(e.OldStartingIndex, e.OldItems.Count); 1077 e = new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Remove, items, e.OldStartingIndex); 1177 if (e.OldStartingIndex < 0) 1181 OnProxyCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, e.OldItems[i], e.OldStartingIndex + i)); 1186 if (e.OldStartingIndex < 0) 1190 OnProxyCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, e.NewItems[i], e.OldItems[i], e.OldStartingIndex + i)); 1348 e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, ConvertItems(e.OldItems), e.NewStartingIndex, e.OldStartingIndex); 1352 e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, ConvertItems(e.OldItems), e.OldStartingIndex); 1356 e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, ConvertItems(e.NewItems), ConvertItems(e.OldItems), e.OldStartingIndex);
PresentationFramework (68)
MS\Internal\Data\CompositeCollectionView.cs (7)
406startingIndex = args.OldStartingIndex; 437UpdateCurrencyAfterRemove(index, args.OldStartingIndex, true); 490int startingIndex = args.OldStartingIndex; 536int oldStartingIndex = args.OldStartingIndex; 577UpdateCurrencyAfterRemove(oldStartingIndex, args.OldStartingIndex, true); 681int flatOldIndex = args.OldStartingIndex; 705if (args.OldStartingIndex >= 0)
MS\Internal\Data\EnumerableCollectionView.cs (5)
420if (args.OldStartingIndex < 0) 423for (int i = args.OldItems.Count - 1, index = args.OldStartingIndex + i; i >= 0; --i, --index) 446if (args.OldStartingIndex < args.NewStartingIndex) 449oldIndex = args.OldStartingIndex + i, 463oldIndex = args.OldStartingIndex + i,
System\Windows\Controls\DataGrid.cs (3)
7265if (GroupingSortDescriptionIndices[i] > e.OldStartingIndex) 7269else if (GroupingSortDescriptionIndices[i] == e.OldStartingIndex) 7283GroupingSortDescriptionIndices.Remove(e.OldStartingIndex);
System\Windows\Controls\DataGridColumnCollection.cs (2)
100UpdateDisplayIndexForMovedColumn(e.OldStartingIndex, e.NewStartingIndex); 108UpdateDisplayIndexForRemovedColumns(e.OldItems, e.OldStartingIndex);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (3)
215newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.OldStartingIndex); 219newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.NewStartingIndex, e.OldStartingIndex); 223newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), HeadersFromColumns(e.OldItems), e.OldStartingIndex);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (3)
695int start = GetVisualIndex(e.OldStartingIndex); 713RemoveHeader(null, GetVisualIndex(e.OldStartingIndex)); 718index = GetVisualIndex(e.OldStartingIndex);
System\Windows\Controls\ItemCollection.cs (7)
2184Debug.Assert(e.OldStartingIndex >= 0); 2187clone.RemoveAt(e.OldStartingIndex); 2192Debug.Assert(e.OldStartingIndex >= 0); 2197clone[e.OldStartingIndex + i] = (T)e.NewItems[i]; 2202Debug.Assert(e.OldStartingIndex >= 0); 2207clone.RemoveAt(e.OldStartingIndex); 2214clone.RemoveAt(e.OldStartingIndex);
System\Windows\Controls\ItemContainerGenerator.cs (2)
2402OnItemRemoved(args.OldItems[0], args.OldStartingIndex); 2422OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.NewStartingIndex);
System\Windows\Controls\ItemsControl.cs (6)
3704if (index > e.OldStartingIndex) 3708else if (index == e.OldStartingIndex) 3719if (e.OldStartingIndex < e.NewStartingIndex) 3721left = e.OldStartingIndex + 1; 3728right = e.OldStartingIndex - 1; 3735if (index == e.OldStartingIndex)
System\Windows\Controls\MultipleCopiesCollection.cs (2)
60Move(e.OldStartingIndex, e.NewStartingIndex); 67RemoveAt(e.OldStartingIndex);
System\Windows\Controls\Primitives\Selector.cs (1)
1263ItemInfo info = NewItemInfo(e.OldItems[0], ItemInfo.SentinelContainer, e.OldStartingIndex);
System\Windows\Controls\TabControl.cs (1)
383int startIndex = e.OldStartingIndex + 1;
System\Windows\Controls\VirtualizedCellInfoCollection.cs (3)
955OnRemoveRow(e.OldStartingIndex, e.OldItems[0]); 959OnReplaceRow(e.OldStartingIndex, e.OldItems[0]); 963OnMoveRow(e.OldStartingIndex, e.NewStartingIndex);
System\Windows\Data\BindingListCollectionView.cs (7)
1520moveCurrency = AdjustCurrencyForRemove(args.OldStartingIndex); 1541AdjustCurrencyForMove(args.OldStartingIndex, args.NewStartingIndex); 1546_group.MoveWithinSubgroups(args.OldItems[0], null, InternalList, args.OldStartingIndex, args.NewStartingIndex); 1816_shadowList.RemoveAt(e.OldStartingIndex); 1819_shadowList[e.OldStartingIndex] = e.NewItems[0]; 1822_shadowList.Move(e.OldStartingIndex, e.NewStartingIndex); 2301AdjustCurrencyForRemove(e.OldStartingIndex);
System\Windows\Data\CollectionView.cs (4)
1093AdjustCurrencyForRemove(args.OldStartingIndex); 1101AdjustCurrencyForReplace(args.OldStartingIndex); 1109AdjustCurrencyForMove(args.OldStartingIndex, args.NewStartingIndex); 1959if (e.OldStartingIndex < 0)
System\Windows\Data\ListCollectionView.cs (12)
1684|| args.Action != NotifyCollectionChangedAction.Add && args.OldStartingIndex < 0) 1738adjustedOldIndex = AdjustBefore(NotifyCollectionChangedAction.Remove, args.OldItems[0], args.OldStartingIndex); 1759if (IsAddingNew && args.OldStartingIndex < _newItemIndex) 1780if (args.OldStartingIndex == _newItemIndex) 1784else if (args.OldStartingIndex < _newItemIndex && _newItemIndex <= args.NewStartingIndex) 1788else if (args.NewStartingIndex <= _newItemIndex && _newItemIndex < args.OldStartingIndex) 2379if (e.OldStartingIndex > _unknownIndex) 2381ShadowCollection.RemoveAt(e.OldStartingIndex); 2389if (e.OldStartingIndex > _unknownIndex) 2391ShadowCollection[e.OldStartingIndex] = e.NewItems[0]; 2402tempIndex = e.OldStartingIndex; 2994AdjustCurrencyForRemove(e.OldStartingIndex);
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
333int deletedItemIndex = i + e.OldStartingIndex;
WindowsBase.Tests (20)
System\ComponentModel\SortDescriptionCollectionTests.cs (20)
94Assert.Equal(0, events[0].OldStartingIndex); 98Assert.Equal(-1, events[1].OldStartingIndex); 180Assert.Equal(-1, events[0].OldStartingIndex); 194Assert.Equal(-1, events[1].OldStartingIndex); 259Assert.Equal(-1, events[0].OldStartingIndex); 273Assert.Equal(-1, events[1].OldStartingIndex); 348Assert.Equal(-1, events[0].OldStartingIndex); 362Assert.Equal(-1, events[1].OldStartingIndex); 428Assert.Equal(-1, events[0].OldStartingIndex); 441Assert.Equal(-1, events[2].OldStartingIndex); 451Assert.Equal(-1, events[3].OldStartingIndex); 500Assert.Equal(-1, events[0].OldStartingIndex); 513Assert.Equal(-1, events[2].OldStartingIndex); 523Assert.Equal(-1, events[3].OldStartingIndex); 586Assert.Equal(1, events[0].OldStartingIndex); 598Assert.Equal(1, events[1].OldStartingIndex); 672Assert.Equal(1, events[0].OldStartingIndex); 684Assert.Equal(1, events[1].OldStartingIndex); 750Assert.Equal(0, events[0].OldStartingIndex); 754Assert.Equal(-1, events[1].OldStartingIndex);