151 references to NewStartingIndex
Microsoft.Maui.Controls (64)
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)
748
int index = e.
NewStartingIndex
;
Picker\Picker.cs (2)
310
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);
PresentationFramework (67)
MS\Internal\Data\CompositeCollectionView.cs (7)
400
startingIndex = args.
NewStartingIndex
;
430
UpdateCurrencyAfterAdd(index, args.
NewStartingIndex
, true);
536
int newStartingIndex = args.
NewStartingIndex
;
572
UpdateCurrencyAfterAdd(newStartingIndex, args.
NewStartingIndex
, true);
681
int flatNewIndex = args.
NewStartingIndex
;
706
if (args.
NewStartingIndex
>= 0)
1450
if (e.
NewStartingIndex
< 0)
MS\Internal\Data\EnumerableCollectionView.cs (8)
402
if (args.
NewStartingIndex
< 0 || _snapshot.Count <= args.
NewStartingIndex
)
413
_snapshot.Insert(args.
NewStartingIndex
, args.NewItems[i]);
432
for (int i = args.NewItems.Count - 1, index = args.
NewStartingIndex
+ i; i >= 0; --i, --index)
442
if (args.
NewStartingIndex
< 0)
445
if (args.OldStartingIndex < args.
NewStartingIndex
)
449
newIndex = args.
NewStartingIndex
+ i;
463
newIndex = args.
NewStartingIndex
+ i;
System\Windows\Controls\DataGrid.cs (1)
7247
if (GroupingSortDescriptionIndices[i] >= e.
NewStartingIndex
)
System\Windows\Controls\DataGridColumnCollection.cs (2)
90
UpdateDisplayIndexForNewColumns(e.NewItems, e.
NewStartingIndex
);
99
UpdateDisplayIndexForMovedColumn(e.OldStartingIndex, e.
NewStartingIndex
);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (2)
210
newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), e.
NewStartingIndex
);
218
newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.
NewStartingIndex
, e.OldStartingIndex);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
695
int end = GetVisualIndex(e.
NewStartingIndex
);
704
index = GetVisualIndex(e.
NewStartingIndex
);
System\Windows\Controls\ItemCollection.cs (4)
2171
Debug.Assert(e.
NewStartingIndex
>= 0);
2176
clone.Insert(e.
NewStartingIndex
+ i, (T)e.NewItems[i]);
2206
clone.Insert(e.
NewStartingIndex
, (T)e.NewItems[0]);
2216
clone.Insert(e.
NewStartingIndex
+ i, (T)e.NewItems[i]);
System\Windows\Controls\ItemContainerGenerator.cs (3)
2393
OnItemAdded(args.NewItems[0], args.
NewStartingIndex
);
2409
OnItemReplaced(args.OldItems[0], args.NewItems[0], args.
NewStartingIndex
);
2419
OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.
NewStartingIndex
);
System\Windows\Controls\ItemsControl.cs (5)
3691
if (index >= e.
NewStartingIndex
)
3718
if (e.OldStartingIndex < e.
NewStartingIndex
)
3721
right = e.
NewStartingIndex
;
3726
left = e.
NewStartingIndex
;
3736
info.Index = e.
NewStartingIndex
;
System\Windows\Controls\MultipleCopiesCollection.cs (3)
52
Insert(e.
NewStartingIndex
);
59
Move(e.OldStartingIndex, e.
NewStartingIndex
);
73
OnReplace(CopiedItem, CopiedItem, e.
NewStartingIndex
);
System\Windows\Controls\Primitives\Selector.cs (3)
1105
e.
NewStartingIndex
== 0))
1145
ItemInfo info = NewItemInfo(e.NewItems[0], null, e.
NewStartingIndex
);
1166
ItemSetIsSelected(ItemInfoFromIndex(e.
NewStartingIndex
), false);
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
950
OnAddRow(e.
NewStartingIndex
);
962
OnMoveRow(e.OldStartingIndex, e.
NewStartingIndex
);
System\Windows\Data\BindingListCollectionView.cs (9)
1502
BeginAddNew(args.NewItems[0], args.
NewStartingIndex
);
1509
AdjustCurrencyForAdd(args.
NewStartingIndex
);
1532
moveCurrency = AdjustCurrencyForReplace(args.
NewStartingIndex
);
1540
AdjustCurrencyForMove(args.OldStartingIndex, args.
NewStartingIndex
);
1545
_group.MoveWithinSubgroups(args.OldItems[0], null, InternalList, args.OldStartingIndex, args.
NewStartingIndex
);
1812
_shadowList.Insert(e.
NewStartingIndex
, e.NewItems[0]);
1821
_shadowList.Move(e.OldStartingIndex, e.
NewStartingIndex
);
2296
AdjustCurrencyForAdd(e.
NewStartingIndex
);
2450
if (e.
NewStartingIndex
< 0)
System\Windows\Data\CollectionView.cs (3)
1084
AdjustCurrencyForAdd(args.
NewStartingIndex
);
1108
AdjustCurrencyForMove(args.OldStartingIndex, args.
NewStartingIndex
);
1970
if (e.
NewStartingIndex
< 0)
System\Windows\Data\ListCollectionView.cs (12)
1682
if (args.Action != NotifyCollectionChangedAction.Remove && args.
NewStartingIndex
< 0
1722
BeginAddNew(args.NewItems[0], args.
NewStartingIndex
);
1730
adjustedNewIndex = AdjustBefore(NotifyCollectionChangedAction.Add, args.NewItems[0], args.
NewStartingIndex
);
1751
if (IsAddingNew && args.
NewStartingIndex
<= _newItemIndex)
1781
_newItemIndex = args.
NewStartingIndex
;
1783
else if (args.OldStartingIndex < _newItemIndex && _newItemIndex <= args.
NewStartingIndex
)
1787
else if (args.
NewStartingIndex
<= _newItemIndex && _newItemIndex < args.OldStartingIndex)
2368
if (e.
NewStartingIndex
> _unknownIndex)
2370
ShadowCollection.Insert(e.
NewStartingIndex
, e.NewItems[0]);
2407
ShadowCollection.Insert(e.
NewStartingIndex
, e.NewItems[0]);
2517
if (e.
NewStartingIndex
< 0)
2989
AdjustCurrencyForAdd(e.
NewStartingIndex
);
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
600
int startingIndex = args.
NewStartingIndex
;
WindowsBase.Tests (20)
System\ComponentModel\SortDescriptionCollectionTests.cs (20)
93
Assert.Equal(-1, events[0].
NewStartingIndex
);
97
Assert.Equal(0, events[1].
NewStartingIndex
);
179
Assert.Equal(0, events[0].
NewStartingIndex
);
193
Assert.Equal(1, events[1].
NewStartingIndex
);
258
Assert.Equal(0, events[0].
NewStartingIndex
);
272
Assert.Equal(0, events[1].
NewStartingIndex
);
347
Assert.Equal(0, events[0].
NewStartingIndex
);
361
Assert.Equal(0, events[1].
NewStartingIndex
);
427
Assert.Equal(-1, events[0].
NewStartingIndex
);
440
Assert.Equal(-1, events[2].
NewStartingIndex
);
450
Assert.Equal(-1, events[3].
NewStartingIndex
);
499
Assert.Equal(-1, events[0].
NewStartingIndex
);
512
Assert.Equal(-1, events[2].
NewStartingIndex
);
522
Assert.Equal(-1, events[3].
NewStartingIndex
);
585
Assert.Equal(-1, events[0].
NewStartingIndex
);
597
Assert.Equal(-1, events[1].
NewStartingIndex
);
671
Assert.Equal(-1, events[0].
NewStartingIndex
);
683
Assert.Equal(-1, events[1].
NewStartingIndex
);
749
Assert.Equal(-1, events[0].
NewStartingIndex
);
753
Assert.Equal(0, events[1].
NewStartingIndex
);