237 references to OldItems
Microsoft.AspNetCore.Components.WebView.Maui (1)
BlazorWebViewHandler.cs (1)
120 var oldItems = eventArgs.OldItems!.Cast<RootComponent>();
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
BlazorWebView.cs (1)
230 var oldItems = (eventArgs.OldItems ?? Array.Empty<object>()).Cast<RootComponent>();
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
317 var oldItems = (eventArgs.OldItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>();
Microsoft.Maui.Controls (123)
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (3)
579 DeleteRows(e.OldStartingIndex, e.OldItems.Count, section); 590 MoveRows(e.NewStartingIndex, e.OldStartingIndex, e.OldItems.Count, section); 601 ReloadRows(e.OldStartingIndex, e.OldItems.Count, section);
Compatibility\Handlers\Shell\iOS\ShellItemRenderer.cs (2)
191 if (e.OldItems != null) 193 foreach (ShellSection shellSection in e.OldItems)
Compatibility\Handlers\Shell\iOS\ShellSearchResultsRenderer.cs (3)
202 TableView.DeleteRows(GetPaths(section, e.OldStartingIndex, e.OldItems.Count), DeleteRowsAnimation); 211 for (var i = 0; i < e.OldItems.Count; i++) 231 TableView.ReloadRows(GetPaths(section, e.OldStartingIndex, e.OldItems.Count), ReloadRowsAnimation);
Compatibility\Handlers\Shell\iOS\ShellSectionRootRenderer.cs (2)
504 if (e.OldItems != null) 506 foreach (ShellContent oldItem in e.OldItems)
Element\Element.cs (4)
860 foreach (Effect effect in e.OldItems) 870 foreach (Effect effect in e.OldItems) 883 if (e.OldItems != null) 885 foreach (Effect effect in e.OldItems)
FormattedString.cs (2)
41 if (e.OldItems != null) 43 foreach (object item in e.OldItems)
GestureElement.cs (1)
32 foreach (IElementDefinition item in args.OldItems.OfType<IElementDefinition>())
GradientBrush.cs (2)
75 if (e.OldItems != null) 77 foreach (var oldItem in e.OldItems)
Handlers\Items\iOS\ObservableGroupedSource.cs (2)
247 var count = args.OldItems.Count; 257 if (newCount == args.OldItems.Count)
Handlers\Items\iOS\ObservableItemsSource.cs (2)
223 var count = args.OldItems.Count; 233 if (newCount == args.OldItems.Count)
Internals\NotifyCollectionChangedEventArgsExtensions.cs (13)
51 for (var i = 0; i < self.OldItems.Count; i++) 52 removeAt(self.OldItems[i], self.OldStartingIndex); 56 insertIndex -= self.OldItems.Count - 1; 58 for (var i = 0; i < self.OldItems.Count; i++) 59 insert(self.OldItems[i], insertIndex + i, false); 67 for (var i = 0; i < self.OldItems.Count; i++) 68 removeAt(self.OldItems[i], self.OldStartingIndex); 72 if (self.OldStartingIndex < 0 || self.OldItems.Count != self.NewItems.Count) 75 for (var i = 0; i < self.OldItems.Count; i++) 77 removeAt(self.OldItems[i], i + self.OldStartingIndex); 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 (2)
92 var count = args.OldItems.Count; 106 var startIndex = args.OldStartingIndex + args.OldItems.Count - 1;
Label\Label.cs (4)
320 RemoveSpans(e.OldItems); 323 RemoveSpans(e.OldItems); 341 RemoveSpanGestureRecognizers(e.OldItems); 344 RemoveSpanGestureRecognizers(e.OldItems);
LegacyLayouts\Layout.cs (3)
624 if (e.OldItems != null) 626 for (int i = 0; i < e.OldItems.Count; i++) 628 object item = e.OldItems[i];
MultiPage.cs (9)
248 for (int i = removeIndex + e.OldItems.Count; i < Children.Count; i++) 251 for (var i = 0; i < e.OldItems.Count; i++) 272 for (int i = moveIndex + e.OldItems.Count; i <= e.NewStartingIndex; i++) 280 SetIndex(page, GetIndex(page) + e.OldItems.Count); 284 for (var i = 0; i < e.OldItems.Count; i++) 289 insertIndex -= e.OldItems.Count - 1; 291 for (var i = 0; i < e.OldItems.Count; i++) 293 var page = (T)e.OldItems[i]; 304 for (int i = e.OldStartingIndex; i - e.OldStartingIndex < e.OldItems.Count; i++)
ObservableWrapper.cs (3)
204 if (e.OldStartingIndex == -1 || e.OldItems.Count > 1) 207 var removedItem = e.OldItems[0] as TRestrict; 220 var oldReplaceItem = e.OldItems[0] as TRestrict;
Page\Page.cs (5)
732 if (e.OldItems != null) 734 for (var i = 0; i < e.OldItems.Count; i++) 736 var item = (Element)e.OldItems[i]; 785 if (args.OldItems != null) 787 foreach (IElementDefinition item in args.OldItems)
Picker\Picker.cs (3)
325 index = e.OldStartingIndex + e.OldItems.Count - 1; 330 removeStart = Items.Count - e.OldItems.Count; 334 foreach (object _ in e.OldItems)
ResourceDictionary.cs (2)
138 if (e.OldItems != null) 140 foreach (var item in e.OldItems)
Shapes\GeometryGroup.cs (2)
73 if (e.OldItems != null) 75 foreach (var oldItem in e.OldItems)
Shapes\PathFigure.cs (2)
108 if (e.OldItems != null) 110 foreach (var oldItem in e.OldItems)
Shapes\PathGeometry.cs (2)
211 if (e.OldItems != null) 213 foreach (var oldItem in e.OldItems)
Shapes\TransformGroup.cs (2)
52 if (args.OldItems != null) 53 foreach (INotifyPropertyChanged item in args.OldItems)
Shell\BaseShellItem.cs (2)
71 if (args.OldItems != null) 72 foreach (Element element in args.OldItems)
Shell\ShellContent.cs (3)
331 if (e.OldItems != null) 332 for (var i = 0; i < e.OldItems.Count; i++) 334 var el = (Element)e.OldItems[i];
Shell\ShellElementCollection.cs (3)
158 if (e.OldItems != null) 160 Removing(e.OldItems); 259 foreach (BaseShellItem bsi in (e.NewItems ?? e.OldItems ?? Inner))
Shell\ShellItem.cs (5)
156 if (args.OldItems != null) 158 foreach (Element item in args.OldItems) 315 if (e.OldItems != null) 317 for (var i = 0; i < e.OldItems.Count; i++) 319 var element = (Element)e.OldItems[i];
Shell\ShellSection.cs (2)
221 if (args.OldItems != null) 223 foreach (Element item in args.OldItems)
SwipeView\SwipeItems.cs (2)
141 if (notifyCollectionChangedEventArgs.OldItems is not null) 143 foreach (var item in notifyCollectionChangedEventArgs.OldItems)
TableView\TableRoot.cs (2)
53 if (args.OldItems != null) 55 foreach (TableSection section in args.OldItems)
TemplatedItemsList.cs (27)
824 for (int i = removeIndex + e.OldItems.Count; i < _templatedObjects.Count; i++) 827 oldItems = new List<TemplatedItemsList<TView, TItem>>(e.OldItems.Count); 828 for (var i = 0; i < e.OldItems.Count; i++) 847 oldItems = new List<TemplatedItemsList<TView, TItem>>(e.OldItems.Count); 850 for (var i = 0; i < e.OldItems.Count; i++) 878 for (int i = moveIndex + e.OldItems.Count; i <= e.NewStartingIndex; i++) 886 SetIndex(item, GetIndex(item) + e.OldItems.Count); 890 oldItems = new List<TemplatedItemsList<TView, TItem>>(e.OldItems.Count); 892 for (var i = 0; i < e.OldItems.Count; i++) 902 insertIndex -= e.OldItems.Count - 1; 1001 if (e.OldStartingIndex >= 0 && e.OldItems != null) 1002 maxindex = Math.Max(maxindex, e.OldStartingIndex + e.OldItems.Count); 1035 for (int i = moveIndex + e.OldItems.Count; i <= e.NewStartingIndex; i++) 1044 SetIndex(item, GetIndex(item) + e.OldItems.Count); 1048 TItem[] itemsToMove = _templatedObjects.Skip(e.OldStartingIndex).Take(e.OldItems.Count).ToArray(); 1050 _templatedObjects.RemoveRange(e.OldStartingIndex, e.OldItems.Count); 1062 for (int i = removeIndex + e.OldItems.Count; i < _templatedObjects.Count; i++) 1065 var items = new TItem[e.OldItems.Count]; 1076 _templatedObjects.RemoveRange(e.OldStartingIndex, e.OldItems.Count); 1088 IList oldItems = ConvertContent(e.NewStartingIndex, e.OldItems); 1180 for (var i = 0; i < e.OldItems.Count; i++) 1181 OnProxyCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, e.OldItems[i], e.OldStartingIndex + i)); 1189 for (var i = 0; i < e.OldItems.Count; i++) 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);
View\View.cs (2)
127 RemoveItems(args.OldItems); 131 RemoveItems(args.OldItems);
Microsoft.Maui.Controls.Compatibility (7)
iOS\CollectionView\ObservableGroupedSource.cs (2)
222 var count = args.OldItems.Count; 232 if (newCount == args.OldItems.Count)
iOS\CollectionView\ObservableItemsSource.cs (2)
176 var count = args.OldItems.Count; 186 if (newCount == args.OldItems.Count)
iOS\Renderers\ListViewRenderer.cs (3)
605 DeleteRows(e.OldStartingIndex, e.OldItems.Count, section); 616 MoveRows(e.NewStartingIndex, e.OldStartingIndex, e.OldItems.Count, section); 627 ReloadRows(e.OldStartingIndex, e.OldItems.Count, section);
Microsoft.Maui.Controls.Maps (2)
Map.cs (2)
248 if (e.OldItems is not null) 250 foreach (MapElement item in e.OldItems)
Microsoft.VisualStudio.LanguageServices (1)
ValueTracking\TreeViewItemBase.cs (1)
115SetParents(args.OldItems, null);
PresentationFramework (97)
MS\Internal\Data\CompositeCollectionView.cs (15)
407item = args.OldItems[0]; 492CollectionContainer oldCollectionContainer = args.OldItems[0] as CollectionContainer; 511args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems, args.OldItems, startingIndex); 538CollectionContainer oldCollectionContainer = args.OldItems[0] as CollectionContainer; 583args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems, newStartingIndex, oldStartingIndex); 719TraceLog.IdFor(sender), args.Action, TraceLog.IdFor(args.OldItems[0]), TraceLog.IdFor(args.NewItems[0])); 744TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], null); 748flatOldIndex = DeduceFlatIndexForRemove((CollectionContainer)sender, x, args.OldItems[0]); 752args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatOldIndex); 756TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 760args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], args.OldItems[0], flatOldIndex); 764TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 777args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatNewIndex, flatOldIndex); 1448if (e.OldItems.Count != 1) 1453if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
MS\Internal\Data\EnumerableCollectionView.cs (7)
423for (int i = args.OldItems.Count - 1, index = args.OldStartingIndex + i; i >= 0; --i, --index) 425if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[index])) 435if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[index])) 448for (int i = args.OldItems.Count - 1, 454if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[oldIndex])) 465i < args.OldItems.Count; 468if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[oldIndex]))
System\Windows\Annotations\Annotation.cs (6)
707changedItems = e.OldItems; 714foreach (AnnotationResource cargo in e.OldItems) 761changedItems = e.OldItems; 768foreach (AnnotationResource anchor in e.OldItems) 810changedItems = e.OldItems; 817foreach (string author in e.OldItems)
System\Windows\Controls\DataGrid.cs (13)
233UpdateDataGridReference(e.OldItems, /* clear = */ true); 237UpdateDataGridReference(e.OldItems, /* clear = */ true); 255bool visibleColumnsChanged = HasVisibleColumns(e.OldItems); 960foreach (ValidationRule rule in e.OldItems) 968foreach (ValidationRule rule in e.OldItems) 5391foreach (object item in e.OldItems) 7302Debug.Assert(e.OldItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7322Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7444Debug.Assert(e.OldItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7445if (CanConvertToSortDescription(e.OldItems[0] as PropertyGroupDescription)) 7455Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7456if (CanConvertToSortDescription(e.OldItems[0] as PropertyGroupDescription) || 7708foreach (object item in e.OldItems)
System\Windows\Controls\DataGridColumnCollection.cs (4)
108UpdateDisplayIndexForRemovedColumns(e.OldItems, e.OldStartingIndex); 111ClearDisplayIndex(e.OldItems, e.NewItems); 118UpdateDisplayIndexForReplacedColumn(e.OldItems, e.NewItems); 121ClearDisplayIndex(e.OldItems, e.NewItems);
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\ItemCollection.cs (4)
2196if (clone.Count - e.OldItems.Count != origin.Count) 2199for (int i = 0; i < e.OldItems.Count; i++) 2209for (int i = 0; i < e.OldItems.Count; i++) 2226for (int i = 0; i < e.OldItems.Count; i++)
System\Windows\Controls\ItemContainerGenerator.cs (6)
2403if (args.OldItems.Count != 1) 2405OnItemRemoved(args.OldItems[0], args.OldStartingIndex); 2412if (args.OldItems.Count != 1) 2415OnItemReplaced(args.OldItems[0], args.NewItems[0], args.NewStartingIndex); 2422if (args.OldItems.Count != 1) 2425OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.NewStartingIndex);
System\Windows\Controls\MultipleCopiesCollection.cs (1)
65e.OldItems.Count == 1,
System\Windows\Controls\Primitives\Selector.cs (5)
882if (e.OldItems.Count != 1) 885SelectionChange.Unselect(NewUnresolvedItemInfo(e.OldItems[0])); 904if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 907SelectionChange.Unselect(NewUnresolvedItemInfo(e.OldItems[0])); 1266ItemInfo info = NewItemInfo(e.OldItems[0], ItemInfo.SentinelContainer, e.OldStartingIndex);
System\Windows\Controls\TreeView.cs (1)
428if ((selectedItem != null) && selectedItem.Equals(e.OldItems[0]))
System\Windows\Controls\TreeViewItem.cs (1)
984if ((selectedItem != null) && selectedItem.Equals(e.OldItems[0]))
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
955OnRemoveRow(e.OldStartingIndex, e.OldItems[0]); 959OnReplaceRow(e.OldStartingIndex, e.OldItems[0]);
System\Windows\Data\BindingGroup.cs (2)
1331bindingExpr = e.OldItems[0] as BindingExpressionBase; 1337bindingExpr = e.OldItems[0] as BindingExpressionBase;
System\Windows\Data\BindingListCollectionView.cs (5)
1532RemoveItemFromGroups(args.OldItems[0]); 1543RemoveItemFromGroups(args.OldItems[0]); 1561_group.MoveWithinSubgroups(args.OldItems[0], null, InternalList, args.OldStartingIndex, args.NewStartingIndex); 2454if (e.OldItems.Count != 1) 2459if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
System\Windows\Data\CollectionView.cs (4)
1093if (PassesFilter(args.OldItems[0])) 1101if (PassesFilter(args.OldItems[0]) || PassesFilter(args.NewItems[0])) 1985if (e.OldItems.Count != 1) 1992if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
System\Windows\Data\ListCollectionView.cs (13)
1756adjustedOldIndex = AdjustBefore(NotifyCollectionChangedAction.Remove, args.OldItems[0], args.OldStartingIndex); 1783object item = args.OldItems[0]; 1885object oldItem = (args.OldItems != null && args.OldItems.Count > 0) ? args.OldItems[0] : null; 1960args = new NotifyCollectionChangedEventArgs(effectiveAction, args.OldItems[0], adjustedOldIndex); 1990args = new NotifyCollectionChangedEventArgs(effectiveAction, args.NewItems[0], args.OldItems[0], adjustedOldIndex); 2054args = new NotifyCollectionChangedEventArgs(effectiveAction, args.OldItems[0], adjustedNewIndex, adjustedOldIndex); 2060args = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, args.OldItems, adjustedOldIndex); 2403ShadowCollection.Remove(e.OldItems[0]); 2415tempIndex = ShadowCollection.IndexOf(e.OldItems[0]); 2524if (e.OldItems.Count != 1) 2529if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
System\Windows\ResourceDictionary.cs (5)
1856(e.OldItems != null && e.OldItems.Count > 0), 1867oldDictionaries = new List<ResourceDictionary>(e.OldItems.Count); 1869for (int i = 0; i < e.OldItems.Count; i++) 1871mergedDictionary = (ResourceDictionary)e.OldItems[i];
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (3)
551for (int i = 0; i < e.OldItems.Count; i++) 553if (selectedItem != null && RibbonGallery.VerifyEqual(selectedItem, e.OldItems[i])) 560if (highlightedItem != null && RibbonGallery.VerifyEqual(highlightedItem, e.OldItems[i]))
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
336int removedCount = e.OldItems.Count;