176 references to NewStartingIndex
Microsoft.Maui.Controls (89)
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (6)
560 if (e.NewStartingIndex > lastIndex || e.OldStartingIndex > lastIndex) 562 $"Index '{Math.Max(e.NewStartingIndex, e.OldStartingIndex)}' is greater than the number of rows '{lastIndex}'."); 568 if (e.NewStartingIndex == -1 || groupReset) 571 InsertRows(e.NewStartingIndex, e.NewItems.Count, section); 587 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1 || groupReset) 590 MoveRows(e.NewStartingIndex, e.OldStartingIndex, e.OldItems.Count, section);
Compatibility\Handlers\Shell\iOS\ShellSearchResultsRenderer.cs (5)
189 if (e.NewStartingIndex == -1) 193 TableView.InsertRows(GetPaths(section, e.NewStartingIndex, e.NewItems.Count), InsertRowsAnimation); 208 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1) 214 var newIndex = e.NewStartingIndex; 216 if (e.NewStartingIndex < e.OldStartingIndex)
Handlers\Items\iOS\ObservableGroupedSource.cs (7)
213 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 261 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 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 (7)
206 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : IndexOf(args.NewItems[0]); 235 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : IndexOf(args.NewItems[0]); 256 var newPath = NSIndexPath.Create(_section, args.NewStartingIndex); 262 var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex); 263 var end = Math.Max(args.OldStartingIndex, args.NewStartingIndex) + count;
Internals\NotifyCollectionChangedEventArgsExtensions.cs (7)
39 if (self.NewStartingIndex < 0) 43 insert(self.NewItems[i], i + self.NewStartingIndex, true); 48 if (self.NewStartingIndex < 0 || self.OldStartingIndex < 0) 54 int insertIndex = self.NewStartingIndex; 55 if (self.OldStartingIndex < self.NewStartingIndex) 96 return new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Add, e.NewItems, e.NewStartingIndex); 102 return new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Move, e.OldItems, e.NewStartingIndex, e.OldStartingIndex);
Items\MarshalingObservableCollection.cs (3)
98 Insert(args.NewStartingIndex, toMove); 117 var startIndex = args.NewStartingIndex; 129 var startIndex = args.NewStartingIndex;
MultiPage.cs (10)
226 if (e.NewStartingIndex < 0) 229 for (int i = e.NewStartingIndex; i < Children.Count; i++) 236 int index = i + e.NewStartingIndex; 261 if (e.NewStartingIndex < 0 || e.OldStartingIndex < 0) 264 if (e.NewStartingIndex == e.OldStartingIndex) 267 bool movingForward = e.OldStartingIndex < e.NewStartingIndex; 272 for (int i = moveIndex + e.OldItems.Count; i <= e.NewStartingIndex; i++) 277 for (var i = 0; i < e.OldStartingIndex - e.NewStartingIndex; i++) 279 var page = (T)InternalChildren[i + e.NewStartingIndex]; 287 int insertIndex = e.NewStartingIndex;
ObservableWrapper.cs (6)
181 if (e.NewStartingIndex == -1 || e.NewItems.Count > 1) 188 int outerIndex = ToOuterIndex(e.NewStartingIndex); 192 if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1) 200 int outerNewIndex = ToOuterIndex(e.NewStartingIndex); 216 if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1) 231 int index = ToOuterIndex(e.NewStartingIndex);
Page\Page.cs (1)
743 int index = e.NewStartingIndex;
Picker\Picker.cs (2)
307 int insertIndex = e.NewStartingIndex < 0 ? Items.Count : e.NewStartingIndex;
TemplatedItemsList.cs (35)
801 if (e.NewStartingIndex == -1) 804 for (int i = e.NewStartingIndex; i < _templatedObjects.Count; i++) 811 TemplatedItemsList<TView, TItem> converted = InsertGrouped(e.NewItems[i], e.NewStartingIndex + i); 815 OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, newItems, e.NewStartingIndex)); 870 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1) 873 bool movingForward = e.OldStartingIndex < e.NewStartingIndex; 878 for (int i = moveIndex + e.OldItems.Count; i <= e.NewStartingIndex; i++) 883 for (var i = 0; i < e.OldStartingIndex - e.NewStartingIndex; i++) 885 TItem item = _templatedObjects[i + e.NewStartingIndex]; 900 int insertIndex = e.NewStartingIndex; 901 if (e.OldStartingIndex < e.NewStartingIndex) 912 OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, oldItems, e.OldStartingIndex, e.NewStartingIndex)); 999 if (e.NewStartingIndex >= 0 && e.NewItems != null) 1000 maxindex = Math.Max(maxindex, e.NewStartingIndex + e.NewItems.Count); 1009 if (e.NewStartingIndex >= 0) 1011 for (int i = e.NewStartingIndex; i < _templatedObjects.Count; i++) 1014 _templatedObjects.InsertRange(e.NewStartingIndex, Enumerable.Repeat<TItem>(null, e.NewItems.Count)); 1016 IList items = ConvertContent(e.NewStartingIndex, e.NewItems, true, true); 1017 e = new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Add, items, e.NewStartingIndex); 1027 if (e.NewStartingIndex < 0 || e.OldStartingIndex < 0) 1030 bool movingForward = e.OldStartingIndex < e.NewStartingIndex; 1035 for (int i = moveIndex + e.OldItems.Count; i <= e.NewStartingIndex; i++) 1040 for (var i = 0; i < e.OldStartingIndex - e.NewStartingIndex; i++) 1042 TItem item = _templatedObjects[i + e.NewStartingIndex]; 1051 _templatedObjects.InsertRange(e.NewStartingIndex, itemsToMove); 1053 SetIndex(itemsToMove[i], e.NewStartingIndex + i); 1055 e = new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Move, itemsToMove, e.NewStartingIndex, e.OldStartingIndex); 1086 if (e.NewStartingIndex >= 0) 1088 IList oldItems = ConvertContent(e.NewStartingIndex, e.OldItems); 1089 IList newItems = ConvertContent(e.NewStartingIndex, e.NewItems, true, true); 1096 e = new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Replace, newItems, oldItems, e.NewStartingIndex); 1168 if (e.NewStartingIndex < 0) 1172 OnProxyCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, e.NewItems[i], e.NewStartingIndex + i)); 1344 e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, ConvertItems(e.NewItems), e.NewStartingIndex); 1348 e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, ConvertItems(e.OldItems), e.NewStartingIndex, e.OldStartingIndex);
Microsoft.Maui.Controls.Compatibility (20)
iOS\CollectionView\ObservableGroupedSource.cs (7)
188 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 236 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 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 (7)
157 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _itemsSource.IndexOf(args.NewItems[0]); 188 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _itemsSource.IndexOf(args.NewItems[0]); 209 var newPath = NSIndexPath.Create(_section, args.NewStartingIndex); 215 var start = Math.Min(args.OldStartingIndex, args.NewStartingIndex); 216 var end = Math.Max(args.OldStartingIndex, args.NewStartingIndex) + count;
iOS\Renderers\ListViewRenderer.cs (6)
586 if (e.NewStartingIndex > lastIndex || e.OldStartingIndex > lastIndex) 588 $"Index '{Math.Max(e.NewStartingIndex, e.OldStartingIndex)}' is greater than the number of rows '{lastIndex}'."); 594 if (e.NewStartingIndex == -1 || groupReset) 597 InsertRows(e.NewStartingIndex, e.NewItems.Count, section); 613 if (e.OldStartingIndex == -1 || e.NewStartingIndex == -1 || groupReset) 616 MoveRows(e.NewStartingIndex, e.OldStartingIndex, e.OldItems.Count, section);
PresentationFramework (67)
MS\Internal\Data\CompositeCollectionView.cs (7)
403startingIndex = args.NewStartingIndex; 434UpdateCurrencyAfterAdd(index, args.NewStartingIndex, true); 540int newStartingIndex = args.NewStartingIndex; 576UpdateCurrencyAfterAdd(newStartingIndex, args.NewStartingIndex, true); 686int flatNewIndex = args.NewStartingIndex; 711if (args.NewStartingIndex >= 0) 1460if (e.NewStartingIndex < 0)
MS\Internal\Data\EnumerableCollectionView.cs (8)
403if (args.NewStartingIndex < 0 || _snapshot.Count <= args.NewStartingIndex) 414_snapshot.Insert(args.NewStartingIndex, args.NewItems[i]); 433for (int i = args.NewItems.Count - 1, index = args.NewStartingIndex + i; i >= 0; --i, --index) 443if (args.NewStartingIndex < 0) 446if (args.OldStartingIndex < args.NewStartingIndex) 450newIndex = args.NewStartingIndex + i; 464newIndex = args.NewStartingIndex + i;
System\Windows\Controls\DataGrid.cs (1)
7294if (GroupingSortDescriptionIndices[i] >= e.NewStartingIndex)
System\Windows\Controls\DataGridColumnCollection.cs (2)
91UpdateDisplayIndexForNewColumns(e.NewItems, e.NewStartingIndex); 100UpdateDisplayIndexForMovedColumn(e.OldStartingIndex, e.NewStartingIndex);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (2)
211newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), e.NewStartingIndex); 219newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.NewStartingIndex, e.OldStartingIndex);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
696int end = GetVisualIndex(e.NewStartingIndex); 705index = GetVisualIndex(e.NewStartingIndex);
System\Windows\Controls\ItemCollection.cs (4)
2187Debug.Assert(e.NewStartingIndex >= 0); 2192clone.Insert(e.NewStartingIndex + i, (T)e.NewItems[i]); 2222clone.Insert(e.NewStartingIndex, (T)e.NewItems[0]); 2232clone.Insert(e.NewStartingIndex + i, (T)e.NewItems[i]);
System\Windows\Controls\ItemContainerGenerator.cs (3)
2399OnItemAdded(args.NewItems[0], args.NewStartingIndex); 2415OnItemReplaced(args.OldItems[0], args.NewItems[0], args.NewStartingIndex); 2425OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.NewStartingIndex);
System\Windows\Controls\ItemsControl.cs (5)
3722if (index >= e.NewStartingIndex) 3749if (e.OldStartingIndex < e.NewStartingIndex) 3752right = e.NewStartingIndex; 3757left = e.NewStartingIndex; 3767info.Index = e.NewStartingIndex;
System\Windows\Controls\MultipleCopiesCollection.cs (3)
53Insert(e.NewStartingIndex); 60Move(e.OldStartingIndex, e.NewStartingIndex); 74OnReplace(CopiedItem, CopiedItem, e.NewStartingIndex);
System\Windows\Controls\Primitives\Selector.cs (3)
1109e.NewStartingIndex == 0)) 1149ItemInfo info = NewItemInfo(e.NewItems[0], null, e.NewStartingIndex); 1170ItemSetIsSelected(ItemInfoFromIndex(e.NewStartingIndex), false);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
951OnAddRow(e.NewStartingIndex); 963OnMoveRow(e.OldStartingIndex, e.NewStartingIndex);
System\Windows\Data\BindingListCollectionView.cs (9)
1518BeginAddNew(args.NewItems[0], args.NewStartingIndex); 1525AdjustCurrencyForAdd(args.NewStartingIndex); 1548moveCurrency = AdjustCurrencyForReplace(args.NewStartingIndex); 1556AdjustCurrencyForMove(args.OldStartingIndex, args.NewStartingIndex); 1561_group.MoveWithinSubgroups(args.OldItems[0], null, InternalList, args.OldStartingIndex, args.NewStartingIndex); 1828_shadowList.Insert(e.NewStartingIndex, e.NewItems[0]); 1837_shadowList.Move(e.OldStartingIndex, e.NewStartingIndex); 2312AdjustCurrencyForAdd(e.NewStartingIndex); 2466if (e.NewStartingIndex < 0)
System\Windows\Data\CollectionView.cs (3)
1088AdjustCurrencyForAdd(args.NewStartingIndex); 1112AdjustCurrencyForMove(args.OldStartingIndex, args.NewStartingIndex); 1999if (e.NewStartingIndex < 0)
System\Windows\Data\ListCollectionView.cs (12)
1701if (args.Action != NotifyCollectionChangedAction.Remove && args.NewStartingIndex < 0 1741BeginAddNew(args.NewItems[0], args.NewStartingIndex); 1749adjustedNewIndex = AdjustBefore(NotifyCollectionChangedAction.Add, args.NewItems[0], args.NewStartingIndex); 1770if (IsAddingNew && args.NewStartingIndex <= _newItemIndex) 1800_newItemIndex = args.NewStartingIndex; 1802else if (args.OldStartingIndex < _newItemIndex && _newItemIndex <= args.NewStartingIndex) 1806else if (args.NewStartingIndex <= _newItemIndex && _newItemIndex < args.OldStartingIndex) 2387if (e.NewStartingIndex > _unknownIndex) 2389ShadowCollection.Insert(e.NewStartingIndex, e.NewItems[0]); 2426ShadowCollection.Insert(e.NewStartingIndex, e.NewItems[0]); 2536if (e.NewStartingIndex < 0) 3008AdjustCurrencyForAdd(e.NewStartingIndex);
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
610int startingIndex = args.NewStartingIndex;