162 references to NewItems
PresentationFramework (108)
src\Framework\MS\Internal\Data\CompositeCollectionView.cs (13)
423item = args.NewItems[0]; 512CollectionContainer newCollectionContainer = args.NewItems[0] as CollectionContainer; 532args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems, args.OldItems, startingIndex); 742TraceLog.IdFor(sender), args.Action, TraceLog.IdFor(args.OldItems[0]), TraceLog.IdFor(args.NewItems[0])); 755TraceContainerCollectionChange(sender, args.Action, null, args.NewItems[0]); 763args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], flatNewIndex); 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]); 791flatOldIndex = DeduceFlatIndexForRemove((CollectionContainer)sender, x, args.NewItems[0]); 1469if (e.NewItems.Count != 1) 1479if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 1484if (e.NewItems.Count != 1)
src\Framework\MS\Internal\Data\EnumerableCollectionView.cs (6)
412for (int i=0; i<args.NewItems.Count; ++i) 414_snapshot.Add(args.NewItems[i]); 419for (int i=args.NewItems.Count-1; i>=0; --i) 421_snapshot.Insert(args.NewStartingIndex, args.NewItems[i]); 440for (int i=args.NewItems.Count-1, index=args.NewStartingIndex+i; i>=0; --i, --index) 445_snapshot[index] = args.NewItems[i];
src\Framework\System\Windows\Annotations\Annotation.cs (6)
734changedItems = e.NewItems; 750changedItems = e.NewItems; 788changedItems = e.NewItems; 804changedItems = e.NewItems; 837changedItems = e.NewItems; 853changedItems = e.NewItems;
src\Framework\System\Windows\Controls\DataGrid.cs (13)
232UpdateDataGridReference(e.NewItems, /* clear = */ false); 233UpdateColumnSizeConstraints(e.NewItems); 242UpdateDataGridReference(e.NewItems, /* clear = */ false); 243UpdateColumnSizeConstraints(e.NewItems); 260visibleColumnsChanged |= HasVisibleColumns(e.NewItems); 956foreach (ValidationRule rule in e.NewItems) 977foreach (ValidationRule rule in e.NewItems) 7297Debug.Assert(e.NewItems.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"); 7442Debug.Assert(e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7443if (CanConvertToSortDescription(e.NewItems[0] as PropertyGroupDescription)) 7461Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7463CanConvertToSortDescription(e.NewItems[0] as PropertyGroupDescription))
src\Framework\System\Windows\Controls\DataGridColumnCollection.cs (4)
96UpdateDisplayIndexForNewColumns(e.NewItems, e.NewStartingIndex); 116ClearDisplayIndex(e.OldItems, e.NewItems); 123UpdateDisplayIndexForReplacedColumn(e.OldItems, e.NewItems); 126ClearDisplayIndex(e.OldItems, e.NewItems);
src\Framework\System\Windows\Controls\DataGridColumnHeaderCollection.cs (2)
216newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), e.NewStartingIndex); 228newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), HeadersFromColumns(e.OldItems), e.OldStartingIndex);
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
711column = (GridViewColumn)(e.NewItems[0]); 726column = (GridViewColumn)(e.NewItems[0]);
src\Framework\System\Windows\Controls\GridViewRowPresenter.cs (2)
382InternalChildren.AddInternal(CreateCell((GridViewColumn)(e.NewItems[0]))); 391InternalChildren.AddInternal(CreateCell((GridViewColumn)(e.NewItems[0])));
src\Framework\System\Windows\Controls\ItemCollection.cs (8)
2205if (clone.Count + e.NewItems.Count != origin.Count) 2207for (int i = 0; i < e.NewItems.Count; i++) 2209clone.Insert(e.NewStartingIndex + i, (T)e.NewItems[i]); 2228clone[e.OldStartingIndex + i] = (T)e.NewItems[i]; 2236if (e.NewItems.Count == 1) 2239clone.Insert(e.NewStartingIndex, (T)e.NewItems[0]); 2247for (int i = 0; i < e.NewItems.Count; i++) 2249clone.Insert(e.NewStartingIndex + i, (T)e.NewItems[i]);
src\Framework\System\Windows\Controls\ItemContainerGenerator.cs (3)
2411if (args.NewItems.Count != 1) 2413OnItemAdded(args.NewItems[0], args.NewStartingIndex); 2429OnItemReplaced(args.OldItems[0], args.NewItems[0], args.NewStartingIndex);
src\Framework\System\Windows\Controls\MultipleCopiesCollection.cs (3)
55e.NewItems.Count == 1, 62e.NewItems.Count == 1, 76e.NewItems.Count == 1,
src\Framework\System\Windows\Controls\Primitives\Selector.cs (5)
894if (e.NewItems.Count != 1) 897SelectionChange.Select(NewUnresolvedItemInfo(e.NewItems[0]), false /* assumeInItemsCollection */); 923if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 927SelectionChange.Select(NewUnresolvedItemInfo(e.NewItems[0]), false /* assumeInItemsCollection */); 1176ItemInfo info = NewItemInfo(e.NewItems[0], null, e.NewStartingIndex);
src\Framework\System\Windows\Data\BindingGroup.cs (2)
1334bindingExpr = e.NewItems[0] as BindingExpressionBase; 1346bindingExpr = e.NewItems[0] as BindingExpressionBase;
src\Framework\System\Windows\Data\BindingListCollectionView.cs (8)
1530BeginAddNew(args.NewItems[0], args.NewStartingIndex); 1534AddItemToGroups(args.NewItems[0]); 1556AddItemToGroups(args.NewItems[0]); 1840_shadowList.Insert(e.NewStartingIndex, e.NewItems[0]); 1846_shadowList[e.OldStartingIndex] = e.NewItems[0]; 2462if (e.NewItems.Count != 1) 2472if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 2477if (e.NewItems.Count != 1)
src\Framework\System\Windows\Data\CollectionView.cs (6)
1100if (PassesFilter(args.NewItems[0])) 1116if (PassesFilter(args.OldItems[0]) || PassesFilter(args.NewItems[0])) 1124if (PassesFilter(args.NewItems[0])) 1996if (e.NewItems.Count != 1) 2008if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 2013if (e.NewItems.Count != 1)
src\Framework\System\Windows\Data\ListCollectionView.cs (16)
1756BeginAddNew(args.NewItems[0], args.NewStartingIndex); 1764adjustedNewIndex = AdjustBefore(NotifyCollectionChangedAction.Add, args.NewItems[0], args.NewStartingIndex); 1901object newItem = (args.NewItems != null && args.NewItems.Count > 0) ? args.NewItems[0] : null; 2005args = new NotifyCollectionChangedEventArgs(effectiveAction, args.NewItems[0], args.OldItems[0], adjustedOldIndex); 2074args2 = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, args.NewItems, adjustedNewIndex); 2406ShadowCollection.Insert(e.NewStartingIndex, e.NewItems[0]); 2410ShadowCollection.Add(e.NewItems[0]); 2426ShadowCollection[e.OldStartingIndex] = e.NewItems[0]; 2433ShadowCollection[tempIndex] = e.NewItems[0]; 2440tempIndex = ShadowCollection.IndexOf(e.NewItems[0]); 2443ShadowCollection.Insert(e.NewStartingIndex, e.NewItems[0]); 2538if (e.NewItems.Count != 1) 2548if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 2553if (e.NewItems.Count != 1)
src\Framework\System\Windows\Documents\DocumentSequence.cs (2)
758if (args.NewItems.Count != 1) 765object item = args.NewItems[0];
src\Framework\System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
618if (args.NewItems.Count != 1) 624object item = args.NewItems[0];
src\Framework\System\Windows\ResourceDictionary.cs (5)
1843(e.NewItems != null && e.NewItems.Count > 0) || 1873newDictionaries = new List<ResourceDictionary>(e.NewItems.Count); 1875for (int i = 0; i < e.NewItems.Count; i++) 1877mergedDictionary = (ResourceDictionary)e.NewItems[i];
System (1)
compmod\system\collections\specialized\marshalinghelpers.cs (1)
96managedArgs.NewItems,
System.Activities.Core.Presentation (3)
System\Activities\Core\Presentation\StateContainerEditor.ModelChangeReactions.cs (3)
54if (e.NewItems != null) 56foreach (ModelItem added in e.NewItems) 97foreach (ModelItem item in e.NewItems)
System.Activities.Presentation (24)
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\PropertyInspector\CategoryContainer.xaml.cs (4)
418foreach (PropertyEntry property in e.NewItems) 444foreach (PropertyEntry property in e.NewItems) 605this.AddCategoryEditors(e.NewItems); 614this.AddCategoryEditors(e.NewItems);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValueCollection.cs (2)
448foreach (ModelItem item in e.NewItems) 474ModelItem newItem = e.NewItems[i] as ModelItem;
System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemDictionaryImpl.cs (4)
178foreach (ModelItem item in e.NewItems) 198Fx.Assert(e.NewItems != null && e.OldItems != null && e.NewItems.Count == e.OldItems.Count, 201foreach (ModelItem item in e.NewItems)
System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxCategory.cs (1)
95foreach (var tool in e.NewItems)
System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxControl.cs (2)
286foreach (ToolboxCategory category in e.NewItems) 322foreach (ToolboxItemWrapper tool in args.NewItems)
System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (2)
361foreach (ModelItem argument in e.NewItems) 405foreach (DesignTimeArgument arg in e.NewItems)
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindow.cs (2)
531if (null != e.NewItems) 533foreach (MenuItem item in e.NewItems)
System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (1)
296foreach (ModelItem namespaceModel in e.NewItems)
System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (2)
417foreach (ModelItem variable in e.NewItems) 484foreach (DesignTimeVariable var in e.NewItems)
System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (4)
242&& e.NewItems != null 243&& e.NewItems.Count == 1) 249UIElement itemView = containerService.GetContainer((ModelItem)e.NewItems[0], this); 256ModelItem insertedItem = (ModelItem)e.NewItems[0];
System.Data (24)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\FromExpression\Framework\PropertyInspector\CategoryContainer.xaml.cs (4)
418foreach (PropertyEntry property in e.NewItems) 444foreach (PropertyEntry property in e.NewItems) 605this.AddCategoryEditors(e.NewItems); 614this.AddCategoryEditors(e.NewItems);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\Model\ModelPropertyValueCollection.cs (2)
448foreach (ModelItem item in e.NewItems) 474ModelItem newItem = e.NewItems[i] as ModelItem;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemDictionaryImpl.cs (4)
178foreach (ModelItem item in e.NewItems) 198Fx.Assert(e.NewItems != null && e.OldItems != null && e.NewItems.Count == e.OldItems.Count, 201foreach (ModelItem item in e.NewItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxCategory.cs (1)
95foreach (var tool in e.NewItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxControl.cs (2)
286foreach (ToolboxCategory category in e.NewItems) 322foreach (ToolboxItemWrapper tool in args.NewItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ArgumentDesigner.xaml.cs (2)
361foreach (ModelItem argument in e.NewItems) 405foreach (DesignTimeArgument arg in e.NewItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ExtensionWindow.cs (2)
531if (null != e.NewItems) 533foreach (MenuItem item in e.NewItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ImportDesigner.xaml.cs (1)
296foreach (ModelItem namespaceModel in e.NewItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (2)
417foreach (ModelItem variable in e.NewItems) 484foreach (DesignTimeVariable var in e.NewItems)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\WorkflowItemsPresenter.cs (4)
242&& e.NewItems != null 243&& e.NewItems.Count == 1) 249UIElement itemView = containerService.GetContainer((ModelItem)e.NewItems[0], this); 256ModelItem insertedItem = (ModelItem)e.NewItems[0];
System.Data.Services.Client (2)
System\Data\Services\Client\Binding\BindingObserver.cs (2)
776if (eventArgs.NewItems != null) 778foreach (object target in eventArgs.NewItems)