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)
403
startingIndex = args.
NewStartingIndex
;
434
UpdateCurrencyAfterAdd(index, args.
NewStartingIndex
, true);
540
int newStartingIndex = args.
NewStartingIndex
;
576
UpdateCurrencyAfterAdd(newStartingIndex, args.
NewStartingIndex
, true);
686
int flatNewIndex = args.
NewStartingIndex
;
711
if (args.
NewStartingIndex
>= 0)
1460
if (e.
NewStartingIndex
< 0)
MS\Internal\Data\EnumerableCollectionView.cs (8)
403
if (args.
NewStartingIndex
< 0 || _snapshot.Count <= args.
NewStartingIndex
)
414
_snapshot.Insert(args.
NewStartingIndex
, args.NewItems[i]);
433
for (int i = args.NewItems.Count - 1, index = args.
NewStartingIndex
+ i; i >= 0; --i, --index)
443
if (args.
NewStartingIndex
< 0)
446
if (args.OldStartingIndex < args.
NewStartingIndex
)
450
newIndex = args.
NewStartingIndex
+ i;
464
newIndex = args.
NewStartingIndex
+ i;
System\Windows\Controls\DataGrid.cs (1)
7294
if (GroupingSortDescriptionIndices[i] >= e.
NewStartingIndex
)
System\Windows\Controls\DataGridColumnCollection.cs (2)
91
UpdateDisplayIndexForNewColumns(e.NewItems, e.
NewStartingIndex
);
100
UpdateDisplayIndexForMovedColumn(e.OldStartingIndex, e.
NewStartingIndex
);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (2)
211
newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), e.
NewStartingIndex
);
219
newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.
NewStartingIndex
, e.OldStartingIndex);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
696
int end = GetVisualIndex(e.
NewStartingIndex
);
705
index = GetVisualIndex(e.
NewStartingIndex
);
System\Windows\Controls\ItemCollection.cs (4)
2187
Debug.Assert(e.
NewStartingIndex
>= 0);
2192
clone.Insert(e.
NewStartingIndex
+ i, (T)e.NewItems[i]);
2222
clone.Insert(e.
NewStartingIndex
, (T)e.NewItems[0]);
2232
clone.Insert(e.
NewStartingIndex
+ i, (T)e.NewItems[i]);
System\Windows\Controls\ItemContainerGenerator.cs (3)
2399
OnItemAdded(args.NewItems[0], args.
NewStartingIndex
);
2415
OnItemReplaced(args.OldItems[0], args.NewItems[0], args.
NewStartingIndex
);
2425
OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.
NewStartingIndex
);
System\Windows\Controls\ItemsControl.cs (5)
3722
if (index >= e.
NewStartingIndex
)
3749
if (e.OldStartingIndex < e.
NewStartingIndex
)
3752
right = e.
NewStartingIndex
;
3757
left = e.
NewStartingIndex
;
3767
info.Index = e.
NewStartingIndex
;
System\Windows\Controls\MultipleCopiesCollection.cs (3)
53
Insert(e.
NewStartingIndex
);
60
Move(e.OldStartingIndex, e.
NewStartingIndex
);
74
OnReplace(CopiedItem, CopiedItem, e.
NewStartingIndex
);
System\Windows\Controls\Primitives\Selector.cs (3)
1109
e.
NewStartingIndex
== 0))
1149
ItemInfo info = NewItemInfo(e.NewItems[0], null, e.
NewStartingIndex
);
1170
ItemSetIsSelected(ItemInfoFromIndex(e.
NewStartingIndex
), false);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
951
OnAddRow(e.
NewStartingIndex
);
963
OnMoveRow(e.OldStartingIndex, e.
NewStartingIndex
);
System\Windows\Data\BindingListCollectionView.cs (9)
1518
BeginAddNew(args.NewItems[0], args.
NewStartingIndex
);
1525
AdjustCurrencyForAdd(args.
NewStartingIndex
);
1548
moveCurrency = AdjustCurrencyForReplace(args.
NewStartingIndex
);
1556
AdjustCurrencyForMove(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
);
2312
AdjustCurrencyForAdd(e.
NewStartingIndex
);
2466
if (e.
NewStartingIndex
< 0)
System\Windows\Data\CollectionView.cs (3)
1088
AdjustCurrencyForAdd(args.
NewStartingIndex
);
1112
AdjustCurrencyForMove(args.OldStartingIndex, args.
NewStartingIndex
);
1999
if (e.
NewStartingIndex
< 0)
System\Windows\Data\ListCollectionView.cs (12)
1701
if (args.Action != NotifyCollectionChangedAction.Remove && args.
NewStartingIndex
< 0
1741
BeginAddNew(args.NewItems[0], args.
NewStartingIndex
);
1749
adjustedNewIndex = AdjustBefore(NotifyCollectionChangedAction.Add, args.NewItems[0], args.
NewStartingIndex
);
1770
if (IsAddingNew && args.
NewStartingIndex
<= _newItemIndex)
1800
_newItemIndex = args.
NewStartingIndex
;
1802
else if (args.OldStartingIndex < _newItemIndex && _newItemIndex <= args.
NewStartingIndex
)
1806
else if (args.
NewStartingIndex
<= _newItemIndex && _newItemIndex < args.OldStartingIndex)
2387
if (e.
NewStartingIndex
> _unknownIndex)
2389
ShadowCollection.Insert(e.
NewStartingIndex
, e.NewItems[0]);
2426
ShadowCollection.Insert(e.
NewStartingIndex
, e.NewItems[0]);
2536
if (e.
NewStartingIndex
< 0)
3008
AdjustCurrencyForAdd(e.
NewStartingIndex
);
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
610
int startingIndex = args.
NewStartingIndex
;