195 references to OldStartingIndex
Microsoft.Maui.Controls (107)
BindableLayout\BindableLayout.cs (1)
501 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)
226 var startIndex = args.OldStartingIndex; 282 Update(() => _collectionView.MoveSection(args.OldStartingIndex, args.NewStartingIndex)); 286 var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex); 287 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)
321 if (e.OldStartingIndex < Items.Count) 324 removeStart = e.OldStartingIndex; 325 index = e.OldStartingIndex + e.OldItems.Count - 1;
Shell\ShellContent.cs (1)
335 OnChildRemoved(el, e.OldStartingIndex + i);
Shell\ShellItem.cs (1)
320 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);
Microsoft.Maui.Controls.Compatibility (19)
iOS\CollectionView\CarouselViewController.cs (1)
219 _positionAfterUpdate = GetPositionWhenRemovingItems(e.OldStartingIndex, carouselPosition, currentItemPosition, count);
iOS\CollectionView\ObservableGroupedSource.cs (4)
201 var startIndex = args.OldStartingIndex; 257 Update(() => _collectionView.MoveSection(args.OldStartingIndex, args.NewStartingIndex)); 261 var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex); 262 var end = Math.Max(args.OldStartingIndex, args.NewStartingIndex) + count;
iOS\CollectionView\ObservableItemsSource.cs (4)
165 var startIndex = args.OldStartingIndex; 208 var oldPath = NSIndexPath.Create(_section, args.OldStartingIndex); 215 var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex); 216 var end = Math.Max(args.OldStartingIndex, args.NewStartingIndex) + count;
iOS\Renderers\ListViewRenderer.cs (10)
586 if (e.NewStartingIndex > lastIndex || e.OldStartingIndex > lastIndex) 588 $"Index '{Math.Max(e.NewStartingIndex, e.OldStartingIndex)}' is greater than the number of rows '{lastIndex}'."); 602 if (e.OldStartingIndex == -1 || groupReset) 605 DeleteRows(e.OldStartingIndex, e.OldItems.Count, section); 613 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1 || groupReset) 616 MoveRows(e.NewStartingIndex, e.OldStartingIndex, e.OldItems.Count, section); 618 if (e.OldStartingIndex == 0) 624 if (e.OldStartingIndex == -1 || groupReset) 627 ReloadRows(e.OldStartingIndex, e.OldItems.Count, section); 629 if (e.OldStartingIndex == 0)
PresentationFramework (68)
MS\Internal\Data\CompositeCollectionView.cs (7)
408startingIndex = args.OldStartingIndex; 440UpdateCurrencyAfterRemove(index, args.OldStartingIndex, true); 493int startingIndex = args.OldStartingIndex; 539int oldStartingIndex = args.OldStartingIndex; 580UpdateCurrencyAfterRemove(oldStartingIndex, args.OldStartingIndex, true); 685int flatOldIndex = args.OldStartingIndex; 709if (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)
7305if (GroupingSortDescriptionIndices[i] > e.OldStartingIndex) 7309else if (GroupingSortDescriptionIndices[i] == e.OldStartingIndex) 7323GroupingSortDescriptionIndices.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)
2198Debug.Assert(e.OldStartingIndex >= 0); 2201clone.RemoveAt(e.OldStartingIndex); 2206Debug.Assert(e.OldStartingIndex >= 0); 2211clone[e.OldStartingIndex + i] = (T)e.NewItems[i]; 2216Debug.Assert(e.OldStartingIndex >= 0); 2221clone.RemoveAt(e.OldStartingIndex); 2228clone.RemoveAt(e.OldStartingIndex);
System\Windows\Controls\ItemContainerGenerator.cs (2)
2405OnItemRemoved(args.OldItems[0], args.OldStartingIndex); 2425OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.NewStartingIndex);
System\Windows\Controls\ItemsControl.cs (6)
3734if (index > e.OldStartingIndex) 3738else if (index == e.OldStartingIndex) 3749if (e.OldStartingIndex < e.NewStartingIndex) 3751left = e.OldStartingIndex + 1; 3758right = e.OldStartingIndex - 1; 3765if (index == e.OldStartingIndex)
System\Windows\Controls\MultipleCopiesCollection.cs (2)
60Move(e.OldStartingIndex, e.NewStartingIndex); 67RemoveAt(e.OldStartingIndex);
System\Windows\Controls\Primitives\Selector.cs (1)
1266ItemInfo info = NewItemInfo(e.OldItems[0], ItemInfo.SentinelContainer, e.OldStartingIndex);
System\Windows\Controls\TabControl.cs (1)
391int 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)
1535moveCurrency = AdjustCurrencyForRemove(args.OldStartingIndex); 1556AdjustCurrencyForMove(args.OldStartingIndex, args.NewStartingIndex); 1561_group.MoveWithinSubgroups(args.OldItems[0], null, InternalList, args.OldStartingIndex, args.NewStartingIndex); 1831_shadowList.RemoveAt(e.OldStartingIndex); 1834_shadowList[e.OldStartingIndex] = e.NewItems[0]; 1837_shadowList.Move(e.OldStartingIndex, e.NewStartingIndex); 2316AdjustCurrencyForRemove(e.OldStartingIndex);
System\Windows\Data\CollectionView.cs (4)
1096AdjustCurrencyForRemove(args.OldStartingIndex); 1104AdjustCurrencyForReplace(args.OldStartingIndex); 1112AdjustCurrencyForMove(args.OldStartingIndex, args.NewStartingIndex); 1987if (e.OldStartingIndex < 0)
System\Windows\Data\ListCollectionView.cs (12)
1702|| args.Action != NotifyCollectionChangedAction.Add && args.OldStartingIndex < 0) 1756adjustedOldIndex = AdjustBefore(NotifyCollectionChangedAction.Remove, args.OldItems[0], args.OldStartingIndex); 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) 2397if (e.OldStartingIndex > _unknownIndex) 2399ShadowCollection.RemoveAt(e.OldStartingIndex); 2407if (e.OldStartingIndex > _unknownIndex) 2409ShadowCollection[e.OldStartingIndex] = e.NewItems[0]; 2420tempIndex = e.OldStartingIndex; 3012AdjustCurrencyForRemove(e.OldStartingIndex);
System.Windows.Controls.Ribbon (1)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
339int deletedItemIndex = i + e.OldStartingIndex;