102 references to OldItems
Microsoft.VisualStudio.LanguageServices (1)
ValueTracking\TreeViewItemBase.cs (1)
115SetParents(args.OldItems, null);
PresentationFramework (97)
MS\Internal\Data\CompositeCollectionView.cs (15)
413item = args.OldItems[0]; 498CollectionContainer oldCollectionContainer = args.OldItems[0] as CollectionContainer; 517args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems, args.OldItems, startingIndex); 544CollectionContainer oldCollectionContainer = args.OldItems[0] as CollectionContainer; 589args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems, newStartingIndex, oldStartingIndex); 725TraceLog.IdFor(sender), args.Action, TraceLog.IdFor(args.OldItems[0]), TraceLog.IdFor(args.NewItems[0])); 750TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], null); 754flatOldIndex = DeduceFlatIndexForRemove((CollectionContainer)sender, x, args.OldItems[0]); 758args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatOldIndex); 762TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 766args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], args.OldItems[0], flatOldIndex); 770TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 783args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatNewIndex, flatOldIndex); 1454if (e.OldItems.Count != 1) 1459if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
MS\Internal\Data\EnumerableCollectionView.cs (7)
427for (int i = args.OldItems.Count - 1, index = args.OldStartingIndex + i; i >= 0; --i, --index) 429if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[index])) 439if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[index])) 452for (int i = args.OldItems.Count - 1, 458if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[oldIndex])) 469i < args.OldItems.Count; 472if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[oldIndex]))
System\Windows\Annotations\Annotation.cs (6)
714changedItems = e.OldItems; 721foreach (AnnotationResource cargo in e.OldItems) 768changedItems = e.OldItems; 775foreach (AnnotationResource anchor in e.OldItems) 817changedItems = e.OldItems; 824foreach (string author in e.OldItems)
System\Windows\Controls\DataGrid.cs (13)
236UpdateDataGridReference(e.OldItems, /* clear = */ true); 240UpdateDataGridReference(e.OldItems, /* clear = */ true); 258bool visibleColumnsChanged = HasVisibleColumns(e.OldItems); 963foreach (ValidationRule rule in e.OldItems) 971foreach (ValidationRule rule in e.OldItems) 5394foreach (object item in e.OldItems) 7305Debug.Assert(e.OldItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7325Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7447Debug.Assert(e.OldItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7448if (CanConvertToSortDescription(e.OldItems[0] as PropertyGroupDescription)) 7458Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7459if (CanConvertToSortDescription(e.OldItems[0] as PropertyGroupDescription) || 7711foreach (object item in e.OldItems)
System\Windows\Controls\DataGridColumnCollection.cs (4)
112UpdateDisplayIndexForRemovedColumns(e.OldItems, e.OldStartingIndex); 115ClearDisplayIndex(e.OldItems, e.NewItems); 122UpdateDisplayIndexForReplacedColumn(e.OldItems, e.NewItems); 125ClearDisplayIndex(e.OldItems, e.NewItems);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (3)
219newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.OldStartingIndex); 223newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.NewStartingIndex, e.OldStartingIndex); 227newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), HeadersFromColumns(e.OldItems), e.OldStartingIndex);
System\Windows\Controls\ItemCollection.cs (4)
2205if (clone.Count - e.OldItems.Count != origin.Count) 2208for (int i = 0; i < e.OldItems.Count; i++) 2218for (int i = 0; i < e.OldItems.Count; i++) 2235for (int i = 0; i < e.OldItems.Count; i++)
System\Windows\Controls\ItemContainerGenerator.cs (6)
2409if (args.OldItems.Count != 1) 2411OnItemRemoved(args.OldItems[0], args.OldStartingIndex); 2418if (args.OldItems.Count != 1) 2421OnItemReplaced(args.OldItems[0], args.NewItems[0], args.NewStartingIndex); 2428if (args.OldItems.Count != 1) 2431OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.NewStartingIndex);
System\Windows\Controls\MultipleCopiesCollection.cs (1)
68e.OldItems.Count == 1,
System\Windows\Controls\Primitives\Selector.cs (5)
891if (e.OldItems.Count != 1) 894SelectionChange.Unselect(NewUnresolvedItemInfo(e.OldItems[0])); 913if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 916SelectionChange.Unselect(NewUnresolvedItemInfo(e.OldItems[0])); 1275ItemInfo info = NewItemInfo(e.OldItems[0], ItemInfo.SentinelContainer, e.OldStartingIndex);
System\Windows\Controls\TreeView.cs (1)
433if ((selectedItem != null) && selectedItem.Equals(e.OldItems[0]))
System\Windows\Controls\TreeViewItem.cs (1)
988if ((selectedItem != null) && selectedItem.Equals(e.OldItems[0]))
System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
959OnRemoveRow(e.OldStartingIndex, e.OldItems[0]); 963OnReplaceRow(e.OldStartingIndex, e.OldItems[0]);
System\Windows\Data\BindingGroup.cs (2)
1336bindingExpr = e.OldItems[0] as BindingExpressionBase; 1342bindingExpr = e.OldItems[0] as BindingExpressionBase;
System\Windows\Data\BindingListCollectionView.cs (5)
1537RemoveItemFromGroups(args.OldItems[0]); 1548RemoveItemFromGroups(args.OldItems[0]); 1566_group.MoveWithinSubgroups(args.OldItems[0], null, InternalList, args.OldStartingIndex, args.NewStartingIndex); 2459if (e.OldItems.Count != 1) 2464if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
System\Windows\Data\CollectionView.cs (4)
1097if (PassesFilter(args.OldItems[0])) 1105if (PassesFilter(args.OldItems[0]) || PassesFilter(args.NewItems[0])) 1989if (e.OldItems.Count != 1) 1996if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
System\Windows\Data\ListCollectionView.cs (13)
1762adjustedOldIndex = AdjustBefore(NotifyCollectionChangedAction.Remove, args.OldItems[0], args.OldStartingIndex); 1789object item = args.OldItems[0]; 1891object oldItem = (args.OldItems != null && args.OldItems.Count > 0) ? args.OldItems[0] : null; 1966args = new NotifyCollectionChangedEventArgs(effectiveAction, args.OldItems[0], adjustedOldIndex); 1996args = new NotifyCollectionChangedEventArgs(effectiveAction, args.NewItems[0], args.OldItems[0], adjustedOldIndex); 2060args = new NotifyCollectionChangedEventArgs(effectiveAction, args.OldItems[0], adjustedNewIndex, adjustedOldIndex); 2066args = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, args.OldItems, adjustedOldIndex); 2409ShadowCollection.Remove(e.OldItems[0]); 2421tempIndex = ShadowCollection.IndexOf(e.OldItems[0]); 2530if (e.OldItems.Count != 1) 2535if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
System\Windows\ResourceDictionary.cs (5)
1866(e.OldItems != null && e.OldItems.Count > 0), 1877oldDictionaries = new List<ResourceDictionary>(e.OldItems.Count); 1879for (int i = 0; i < e.OldItems.Count; i++) 1881mergedDictionary = (ResourceDictionary)e.OldItems[i];
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (3)
556for (int i = 0; i < e.OldItems.Count; i++) 558if (selectedItem != null && RibbonGallery.VerifyEqual(selectedItem, e.OldItems[i])) 565if (highlightedItem != null && RibbonGallery.VerifyEqual(highlightedItem, e.OldItems[i]))
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
338int removedCount = e.OldItems.Count;