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