146 references to OldItems
PresentationFramework (97)
src\Framework\MS\Internal\Data\CompositeCollectionView.cs (15)
428item = args.OldItems[0]; 513CollectionContainer oldCollectionContainer = args.OldItems[0] as CollectionContainer; 532args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems, args.OldItems, startingIndex); 560CollectionContainer oldCollectionContainer = args.OldItems[0] as CollectionContainer; 606args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems, newStartingIndex, oldStartingIndex); 742TraceLog.IdFor(sender), args.Action, TraceLog.IdFor(args.OldItems[0]), TraceLog.IdFor(args.NewItems[0])); 767TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], null); 771flatOldIndex = DeduceFlatIndexForRemove((CollectionContainer)sender, x, args.OldItems[0]); 775args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatOldIndex); 779TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 783args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], args.OldItems[0], flatOldIndex); 787TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 800args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatNewIndex, flatOldIndex); 1474if (e.OldItems.Count != 1) 1479if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
src\Framework\MS\Internal\Data\EnumerableCollectionView.cs (7)
430for (int i=args.OldItems.Count-1, index=args.OldStartingIndex+i; i>=0; --i, --index) 432if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[index])) 442if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[index])) 455for (int i = args.OldItems.Count - 1, 461if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[oldIndex])) 472i < args.OldItems.Count; 475if (!System.Windows.Controls.ItemsControl.EqualsEx(args.OldItems[i], _snapshot[oldIndex]))
src\Framework\System\Windows\Annotations\Annotation.cs (6)
739changedItems = e.OldItems; 746foreach (AnnotationResource cargo in e.OldItems) 793changedItems = e.OldItems; 800foreach (AnnotationResource anchor in e.OldItems) 842changedItems = e.OldItems; 849foreach (string author in e.OldItems)
src\Framework\System\Windows\Controls\DataGrid.cs (13)
237UpdateDataGridReference(e.OldItems, /* clear = */ true); 241UpdateDataGridReference(e.OldItems, /* clear = */ true); 259bool visibleColumnsChanged = HasVisibleColumns(e.OldItems); 964foreach (ValidationRule rule in e.OldItems) 972foreach (ValidationRule rule in e.OldItems) 5399foreach (object item in e.OldItems) 7308Debug.Assert(e.OldItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7328Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "SortDescriptionCollection should handle one element at a time"); 7450Debug.Assert(e.OldItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7451if (CanConvertToSortDescription(e.OldItems[0] as PropertyGroupDescription)) 7461Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7462if (CanConvertToSortDescription(e.OldItems[0] as PropertyGroupDescription) || 7714foreach (object item in e.OldItems)
src\Framework\System\Windows\Controls\DataGridColumnCollection.cs (4)
113UpdateDisplayIndexForRemovedColumns(e.OldItems, e.OldStartingIndex); 116ClearDisplayIndex(e.OldItems, e.NewItems); 123UpdateDisplayIndexForReplacedColumn(e.OldItems, e.NewItems); 126ClearDisplayIndex(e.OldItems, e.NewItems);
src\Framework\System\Windows\Controls\DataGridColumnHeaderCollection.cs (3)
220newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.OldStartingIndex); 224newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.NewStartingIndex, e.OldStartingIndex); 228newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), HeadersFromColumns(e.OldItems), e.OldStartingIndex);
src\Framework\System\Windows\Controls\ItemCollection.cs (4)
2213if (clone.Count - e.OldItems.Count != origin.Count) 2216for (int i = 0; i < e.OldItems.Count; i++) 2226for (int i = 0; i < e.OldItems.Count; i++) 2243for (int i = 0; i < e.OldItems.Count; i++)
src\Framework\System\Windows\Controls\ItemContainerGenerator.cs (6)
2417if (args.OldItems.Count != 1) 2419OnItemRemoved(args.OldItems[0], args.OldStartingIndex); 2426if (args.OldItems.Count != 1) 2429OnItemReplaced(args.OldItems[0], args.NewItems[0], args.NewStartingIndex); 2436if (args.OldItems.Count != 1) 2439OnItemMoved(args.OldItems[0], args.OldStartingIndex, args.NewStartingIndex);
src\Framework\System\Windows\Controls\MultipleCopiesCollection.cs (1)
69e.OldItems.Count == 1,
src\Framework\System\Windows\Controls\Primitives\Selector.cs (5)
901if (e.OldItems.Count != 1) 904SelectionChange.Unselect(NewUnresolvedItemInfo(e.OldItems[0])); 923if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 926SelectionChange.Unselect(NewUnresolvedItemInfo(e.OldItems[0])); 1293ItemInfo info = NewItemInfo(e.OldItems[0], ItemInfo.SentinelContainer, e.OldStartingIndex);
src\Framework\System\Windows\Controls\TreeView.cs (1)
434if ((selectedItem != null) && selectedItem.Equals(e.OldItems[0]))
src\Framework\System\Windows\Controls\TreeViewItem.cs (1)
988if ((selectedItem != null) && selectedItem.Equals(e.OldItems[0]))
src\Framework\System\Windows\Controls\VirtualizedCellInfoCollection.cs (2)
962OnRemoveRow(e.OldStartingIndex, e.OldItems[0]); 966OnReplaceRow(e.OldStartingIndex, e.OldItems[0]);
src\Framework\System\Windows\Data\BindingGroup.cs (2)
1338bindingExpr = e.OldItems[0] as BindingExpressionBase; 1344bindingExpr = e.OldItems[0] as BindingExpressionBase;
src\Framework\System\Windows\Data\BindingListCollectionView.cs (5)
1544RemoveItemFromGroups(args.OldItems[0]); 1555RemoveItemFromGroups(args.OldItems[0]); 1573_group.MoveWithinSubgroups(args.OldItems[0], null, InternalList, args.OldStartingIndex, args.NewStartingIndex); 2467if (e.OldItems.Count != 1) 2472if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
src\Framework\System\Windows\Data\CollectionView.cs (4)
1108if (PassesFilter(args.OldItems[0])) 1116if (PassesFilter(args.OldItems[0]) || PassesFilter(args.NewItems[0])) 2001if (e.OldItems.Count != 1) 2008if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
src\Framework\System\Windows\Data\ListCollectionView.cs (13)
1771adjustedOldIndex = AdjustBefore(NotifyCollectionChangedAction.Remove, args.OldItems[0], args.OldStartingIndex); 1798object item = args.OldItems[0]; 1900object oldItem = (args.OldItems != null && args.OldItems.Count > 0) ? args.OldItems[0] : null; 1975args = new NotifyCollectionChangedEventArgs(effectiveAction, args.OldItems[0], adjustedOldIndex); 2005args = new NotifyCollectionChangedEventArgs(effectiveAction, args.NewItems[0], args.OldItems[0], adjustedOldIndex); 2069args = new NotifyCollectionChangedEventArgs(effectiveAction, args.OldItems[0], adjustedNewIndex, adjustedOldIndex); 2075args = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, args.OldItems, adjustedOldIndex); 2420ShadowCollection.Remove(e.OldItems[0]); 2432tempIndex = ShadowCollection.IndexOf(e.OldItems[0]); 2543if (e.OldItems.Count != 1) 2548if (e.NewItems.Count != 1 || e.OldItems.Count != 1)
src\Framework\System\Windows\ResourceDictionary.cs (5)
1844(e.OldItems != null && e.OldItems.Count > 0), 1855oldDictionaries = new List<ResourceDictionary>(e.OldItems.Count); 1857for (int i = 0; i < e.OldItems.Count; i++) 1859mergedDictionary = (ResourceDictionary)e.OldItems[i];
System (1)
compmod\system\collections\specialized\marshalinghelpers.cs (1)
97managedArgs.OldItems,
System.Activities.Core.Presentation (6)
System\Activities\Core\Presentation\StateContainerEditor.ModelChangeReactions.cs (4)
29if (e.OldItems != null) 31foreach (ModelItem deleted in e.OldItems) 78if (e.OldItems != null) 80foreach (ModelItem deleted in e.OldItems)
System\ServiceModel\Activities\Presentation\CorrelationInitializerDesigner.xaml.cs (1)
98foreach (CorrelationInitializerEntry entry in e.OldItems)
System\ServiceModel\Activities\Presentation\MessageQuerySetDesigner.xaml.cs (1)
166foreach (MessageQueryEntry entry in e.OldItems)
System.Activities.Presentation (20)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\PropertyInspector\CategoryContainer.xaml.cs (4)
425foreach (PropertyEntry property in e.OldItems) 451foreach (PropertyEntry property in e.OldItems) 609this.RemoveCategoryEditors(e.OldItems); 613this.RemoveCategoryEditors(e.OldItems);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValueCollection.cs (4)
455foreach (ModelItem item in e.OldItems) 463for (int i = 0; i < e.OldItems.Count; i++) 471for (int i = 0; i < e.OldItems.Count; i++) 473ModelItem oldItem = e.OldItems[i] as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemDictionaryImpl.cs (3)
187foreach (ModelItem item in e.OldItems) 198Fx.Assert(e.NewItems != null && e.OldItems != null && e.NewItems.Count == e.OldItems.Count,
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (2)
375foreach (ModelItem argument in e.OldItems) 393foreach (DesignTimeArgument arg in e.OldItems)
System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (1)
303foreach (ModelItem namespaceModel in e.OldItems)
System.Activities.Presentation\System\Activities\Presentation\View\TreeView\TreeViewItemViewModel.cs (1)
592foreach (TreeViewItemViewModel item in e.OldItems)
System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (2)
449foreach (ModelItem variable in e.OldItems) 472foreach (DesignTimeVariable arg in e.OldItems)
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (3)
269if (e.OldItems != null && e.OldItems.Count == 1) 287foreach (ModelItem selectedAndRemovedItem in selectedItems.Intersect(e.OldItems.Cast<ModelItem>()))
System.Data (20)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\PropertyInspector\CategoryContainer.xaml.cs (4)
425foreach (PropertyEntry property in e.OldItems) 451foreach (PropertyEntry property in e.OldItems) 609this.RemoveCategoryEditors(e.OldItems); 613this.RemoveCategoryEditors(e.OldItems);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValueCollection.cs (4)
455foreach (ModelItem item in e.OldItems) 463for (int i = 0; i < e.OldItems.Count; i++) 471for (int i = 0; i < e.OldItems.Count; i++) 473ModelItem oldItem = e.OldItems[i] as ModelItem;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemDictionaryImpl.cs (3)
187foreach (ModelItem item in e.OldItems) 198Fx.Assert(e.NewItems != null && e.OldItems != null && e.NewItems.Count == e.OldItems.Count,
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (2)
375foreach (ModelItem argument in e.OldItems) 393foreach (DesignTimeArgument arg in e.OldItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (1)
303foreach (ModelItem namespaceModel in e.OldItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\TreeView\TreeViewItemViewModel.cs (1)
592foreach (TreeViewItemViewModel item in e.OldItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (2)
449foreach (ModelItem variable in e.OldItems) 472foreach (DesignTimeVariable arg in e.OldItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (3)
269if (e.OldItems != null && e.OldItems.Count == 1) 287foreach (ModelItem selectedAndRemovedItem in selectedItems.Intersect(e.OldItems.Cast<ModelItem>()))
System.Data.Services.Client (2)
System\Data\Services\Client\Binding\BindingObserver.cs (2)
817if (eventArgs.OldItems != null) 820eventArgs.OldItems,