237 references to NewItems
Microsoft.AspNetCore.Components.WebView.Maui (1)
BlazorWebViewHandler.cs (1)
119 var newItems = eventArgs.NewItems!.Cast<RootComponent>();
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
BlazorWebView.cs (1)
229 var newItems = (eventArgs.NewItems ?? Array.Empty<object>()).Cast<RootComponent>();
Microsoft.AspNetCore.Components.WebView.Wpf (1)
BlazorWebView.cs (1)
316 var newItems = (eventArgs.NewItems ?? Array.Empty<RootComponent>()).Cast<RootComponent>();
Microsoft.Maui.Controls (110)
BindableLayout\BindableLayout.cs (1)
503 foreach (var item in e.NewItems!)
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (1)
571 InsertRows(e.NewStartingIndex, e.NewItems.Count, section);
Compatibility\Handlers\Shell\iOS\ShellItemRenderer.cs (2)
205 if (e.NewItems != null && e.NewItems.Count > 0)
Compatibility\Handlers\Shell\iOS\ShellSearchResultsRenderer.cs (1)
193 TableView.InsertRows(GetPaths(section, e.NewStartingIndex, e.NewItems.Count), InsertRowsAnimation);
Compatibility\Handlers\Shell\iOS\ShellSectionRootRenderer.cs (2)
528 if (e.NewItems != null) 530 foreach (ShellContent newItem in e.NewItems)
Element\Element.cs (4)
852 foreach (Effect effect in e.NewItems) 866 foreach (Effect effect in e.NewItems) 876 if (e.NewItems != null) 878 foreach (Effect effect in e.NewItems)
FormattedString.cs (2)
56 if (e.NewItems != null) 58 foreach (object item in e.NewItems)
GestureElement.cs (1)
23 foreach (IElementDefinition item in args.NewItems.OfType<IElementDefinition>())
GradientBrush.cs (2)
87 if (e.NewItems != null) 89 foreach (var newItem in e.NewItems)
Handlers\Items\iOS\ObservableGroupedSource.cs (5)
213 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 214 var count = args.NewItems.Count; 255 var newCount = args.NewItems.Count; 261 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 275 var count = args.NewItems.Count;
Handlers\Items\iOS\ObservableItemsSource.cs (5)
204 var count = args.NewItems.Count; 206 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : IndexOf(args.NewItems[0]); 231 var newCount = args.NewItems.Count; 235 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : IndexOf(args.NewItems[0]); 250 var count = args.NewItems.Count;
Internals\NotifyCollectionChangedEventArgsExtensions.cs (6)
42 for (var i = 0; i < self.NewItems.Count; i++) 43 insert(self.NewItems[i], i + self.NewStartingIndex, true); 72 if (self.OldStartingIndex < 0 || self.OldItems.Count != self.NewItems.Count) 78 insert(self.NewItems[i], i + self.OldStartingIndex, true); 96 return new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Add, e.NewItems, e.NewStartingIndex); 105 return new NotifyCollectionChangedEventArgsEx(count, NotifyCollectionChangedAction.Replace, e.NewItems, e.OldItems, e.OldStartingIndex);
Items\MarshalingObservableCollection.cs (2)
118 foreach (var item in args.NewItems) 130 foreach (var item in args.NewItems)
Label\Label.cs (4)
317 SetupSpans(e.NewItems); 324 SetupSpans(e.NewItems); 338 SetupSpanGestureRecognizers(e.NewItems); 345 SetupSpanGestureRecognizers(e.NewItems);
LegacyLayouts\Layout.cs (3)
639 if (e.NewItems != null) 641 for (int i = 0; i < e.NewItems.Count; i++) 643 object item = e.NewItems[i];
MultiPage.cs (5)
230 SetIndex((T)InternalChildren[i], i + e.NewItems.Count); 232 for (var i = 0; i < e.NewItems.Count; i++) 234 var page = (T)e.NewItems[i]; 238 InternalChildren.Insert(index, (T)e.NewItems[i]); 310 T page = _templatedItems.GetOrCreateContent(i, e.NewItems[i - e.OldStartingIndex]);
ObservableWrapper.cs (8)
181 if (e.NewStartingIndex == -1 || e.NewItems.Count > 1) 184 var newItem = e.NewItems[0] as TRestrict; 189 handler(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, e.NewItems, outerIndex)); 192 if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1) 195 var movedItem = e.NewItems[0] as TRestrict; 201 handler(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, e.NewItems, outerNewIndex, outerOldIndex)); 216 if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1) 219 var newReplaceItem = e.NewItems[0] as TRestrict;
Page\Page.cs (4)
741 if (e.NewItems != null) 745 foreach (Element item in e.NewItems) 779 if (args.NewItems != null) 781 foreach (IElementDefinition item in args.NewItems)
Picker\Picker.cs (1)
309 foreach (object newItem in e.NewItems)
ResourceDictionary.cs (2)
126 if (e.NewItems != null) 128 foreach (var item in e.NewItems)
Shapes\GeometryGroup.cs (2)
84 if (e.NewItems != null) 86 foreach (var newItem in e.NewItems)
Shapes\PathFigure.cs (2)
119 if (e.NewItems != null) 121 foreach (var newItem in e.NewItems)
Shapes\PathGeometry.cs (2)
223 if (e.NewItems != null) 225 foreach (var newItem in e.NewItems)
Shapes\TransformGroup.cs (2)
46 if (args.NewItems != null) 47 foreach (INotifyPropertyChanged item in args.NewItems)
Shell\BaseShellItem.cs (2)
67 if (args.NewItems != null) 68 foreach (Element element in args.NewItems)
Shell\ShellContent.cs (2)
327 if (e.NewItems != null) 328 foreach (Element el in e.NewItems)
Shell\ShellElementCollection.cs (5)
47 if (args?.NewItems?.Count > 0 && _pauseCollectionChanged) 90 var pendingEvents = _notifyCollectionChangedEventArgs.OrderBy(x => x.NewItems != null ? 0 : 1).ToList(); 147 if (e.NewItems != null) 149 foreach (BaseShellItem element in e.NewItems) 259 foreach (BaseShellItem bsi in (e.NewItems ?? e.OldItems ?? Inner))
Shell\ShellItem.cs (4)
164 if (args.NewItems != null) 166 foreach (Element item in args.NewItems) 309 if (e.NewItems != null) 311 foreach (Element element in e.NewItems)
Shell\ShellSection.cs (2)
229 if (args.NewItems != null) 231 foreach (Element item in args.NewItems)
SwipeView\SwipeItems.cs (2)
131 if (notifyCollectionChangedEventArgs.NewItems is not null) 133 foreach (var item in notifyCollectionChangedEventArgs.NewItems)
TableView\TableRoot.cs (2)
44 if (args.NewItems != null) 46 foreach (TableSection section in args.NewItems)
TableView\TableSection.cs (2)
150 if (notifyCollectionChangedEventArgs.NewItems == null) 153 foreach (BindableObject item in notifyCollectionChangedEventArgs.NewItems)
TableView\TableView.cs (1)
161 childCollectionChangedEventArgs.Args.NewItems?.Cast<Cell>().ForEach(cell => cell.Parent = this);
TemplatedItemsList.cs (17)
805 SetIndex(_templatedObjects[i], i + e.NewItems.Count); 807 newItems = new List<TemplatedItemsList<TView, TItem>>(e.NewItems.Count); 809 for (var i = 0; i < e.NewItems.Count; i++) 811 TemplatedItemsList<TView, TItem> converted = InsertGrouped(e.NewItems[i], e.NewStartingIndex + i); 848 newItems = new List<TemplatedItemsList<TView, TItem>>(e.NewItems.Count); 861 newItems.Add(InsertGrouped(e.NewItems[i], index)); 999 if (e.NewStartingIndex >= 0 && e.NewItems != null) 1000 maxindex = Math.Max(maxindex, e.NewStartingIndex + e.NewItems.Count); 1012 SetIndex(_templatedObjects[i], i + e.NewItems.Count); 1014 _templatedObjects.InsertRange(e.NewStartingIndex, Enumerable.Repeat<TItem>(null, e.NewItems.Count)); 1016 IList items = ConvertContent(e.NewStartingIndex, e.NewItems, true, true); 1089 IList newItems = ConvertContent(e.NewStartingIndex, e.NewItems, true, true); 1171 for (var i = 0; i < e.NewItems.Count; i++) 1172 OnProxyCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, e.NewItems[i], e.NewStartingIndex + i)); 1190 OnProxyCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, e.NewItems[i], e.OldItems[i], e.OldStartingIndex + i)); 1344 e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, ConvertItems(e.NewItems), e.NewStartingIndex); 1356 e = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, ConvertItems(e.NewItems), ConvertItems(e.OldItems), e.OldStartingIndex);
View\View.cs (2)
124 AddItems(args.NewItems); 130 AddItems(args.NewItems);
Microsoft.Maui.Controls.Compatibility (11)
iOS\CollectionView\ObservableGroupedSource.cs (5)
188 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 189 var count = args.NewItems.Count; 230 var newCount = args.NewItems.Count; 236 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _groupSource.IndexOf(args.NewItems[0]); 250 var count = args.NewItems.Count;
iOS\CollectionView\ObservableItemsSource.cs (5)
155 var count = args.NewItems.Count; 157 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _itemsSource.IndexOf(args.NewItems[0]); 184 var newCount = args.NewItems.Count; 188 var startIndex = args.NewStartingIndex > -1 ? args.NewStartingIndex : _itemsSource.IndexOf(args.NewItems[0]); 203 var count = args.NewItems.Count;
iOS\Renderers\ListViewRenderer.cs (1)
597 InsertRows(e.NewStartingIndex, e.NewItems.Count, section);
Microsoft.Maui.Controls.Maps (4)
Map.cs (4)
229 if (e.NewItems is not null && e.NewItems.Cast<Pin>().Any(pin => pin.Label is null)) 240 if (e.NewItems is not null) 242 foreach (MapElement item in e.NewItems)
Microsoft.VisualStudio.LanguageServices (1)
ValueTracking\TreeViewItemBase.cs (1)
116SetParents(args.NewItems, this);
PresentationFramework (108)
MS\Internal\Data\CompositeCollectionView.cs (13)
402item = args.NewItems[0]; 491CollectionContainer newCollectionContainer = args.NewItems[0] as CollectionContainer; 511args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems, args.OldItems, startingIndex); 719TraceLog.IdFor(sender), args.Action, TraceLog.IdFor(args.OldItems[0]), TraceLog.IdFor(args.NewItems[0])); 732TraceContainerCollectionChange(sender, args.Action, null, args.NewItems[0]); 740args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], flatNewIndex); 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]); 768flatOldIndex = DeduceFlatIndexForRemove((CollectionContainer)sender, x, args.NewItems[0]); 1443if (e.NewItems.Count != 1) 1453if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 1458if (e.NewItems.Count != 1)
MS\Internal\Data\EnumerableCollectionView.cs (6)
405for (int i = 0; i < args.NewItems.Count; ++i) 407_snapshot.Add(args.NewItems[i]); 412for (int i = args.NewItems.Count - 1; i >= 0; --i) 414_snapshot.Insert(args.NewStartingIndex, args.NewItems[i]); 433for (int i = args.NewItems.Count - 1, index = args.NewStartingIndex + i; i >= 0; --i, --index) 438_snapshot[index] = args.NewItems[i];
System\Windows\Annotations\Annotation.cs (6)
702changedItems = e.NewItems; 718changedItems = e.NewItems; 756changedItems = e.NewItems; 772changedItems = e.NewItems; 805changedItems = e.NewItems; 821changedItems = e.NewItems;
System\Windows\Controls\DataGrid.cs (13)
228UpdateDataGridReference(e.NewItems, /* clear = */ false); 229UpdateColumnSizeConstraints(e.NewItems); 238UpdateDataGridReference(e.NewItems, /* clear = */ false); 239UpdateColumnSizeConstraints(e.NewItems); 256visibleColumnsChanged |= HasVisibleColumns(e.NewItems); 952foreach (ValidationRule rule in e.NewItems) 973foreach (ValidationRule rule in e.NewItems) 7291Debug.Assert(e.NewItems.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"); 7436Debug.Assert(e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7437if (CanConvertToSortDescription(e.NewItems[0] as PropertyGroupDescription)) 7455Debug.Assert(e.OldItems.Count == 1 && e.NewItems.Count == 1, "GroupDescriptionCollection should handle one element at a time"); 7457CanConvertToSortDescription(e.NewItems[0] as PropertyGroupDescription))
System\Windows\Controls\DataGridColumnCollection.cs (4)
91UpdateDisplayIndexForNewColumns(e.NewItems, e.NewStartingIndex); 111ClearDisplayIndex(e.OldItems, e.NewItems); 118UpdateDisplayIndexForReplacedColumn(e.OldItems, e.NewItems); 121ClearDisplayIndex(e.OldItems, e.NewItems);
System\Windows\Controls\DataGridColumnHeaderCollection.cs (2)
211newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), e.NewStartingIndex); 223newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), HeadersFromColumns(e.OldItems), e.OldStartingIndex);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (2)
706column = (GridViewColumn)(e.NewItems[0]); 721column = (GridViewColumn)(e.NewItems[0]);
System\Windows\Controls\GridViewRowPresenter.cs (2)
375InternalChildren.AddInternal(CreateCell((GridViewColumn)(e.NewItems[0]))); 384InternalChildren.AddInternal(CreateCell((GridViewColumn)(e.NewItems[0])));
System\Windows\Controls\ItemCollection.cs (8)
2188if (clone.Count + e.NewItems.Count != origin.Count) 2190for (int i = 0; i < e.NewItems.Count; i++) 2192clone.Insert(e.NewStartingIndex + i, (T)e.NewItems[i]); 2211clone[e.OldStartingIndex + i] = (T)e.NewItems[i]; 2219if (e.NewItems.Count == 1) 2222clone.Insert(e.NewStartingIndex, (T)e.NewItems[0]); 2230for (int i = 0; i < e.NewItems.Count; i++) 2232clone.Insert(e.NewStartingIndex + i, (T)e.NewItems[i]);
System\Windows\Controls\ItemContainerGenerator.cs (3)
2397if (args.NewItems.Count != 1) 2399OnItemAdded(args.NewItems[0], args.NewStartingIndex); 2415OnItemReplaced(args.OldItems[0], args.NewItems[0], args.NewStartingIndex);
System\Windows\Controls\MultipleCopiesCollection.cs (3)
51e.NewItems.Count == 1, 58e.NewItems.Count == 1, 72e.NewItems.Count == 1,
System\Windows\Controls\Primitives\Selector.cs (5)
875if (e.NewItems.Count != 1) 878SelectionChange.Select(NewUnresolvedItemInfo(e.NewItems[0]), false /* assumeInItemsCollection */); 904if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 908SelectionChange.Select(NewUnresolvedItemInfo(e.NewItems[0]), false /* assumeInItemsCollection */); 1149ItemInfo info = NewItemInfo(e.NewItems[0], null, e.NewStartingIndex);
System\Windows\Data\BindingGroup.cs (2)
1327bindingExpr = e.NewItems[0] as BindingExpressionBase; 1339bindingExpr = e.NewItems[0] as BindingExpressionBase;
System\Windows\Data\BindingListCollectionView.cs (8)
1518BeginAddNew(args.NewItems[0], args.NewStartingIndex); 1522AddItemToGroups(args.NewItems[0]); 1544AddItemToGroups(args.NewItems[0]); 1828_shadowList.Insert(e.NewStartingIndex, e.NewItems[0]); 1834_shadowList[e.OldStartingIndex] = e.NewItems[0]; 2449if (e.NewItems.Count != 1) 2459if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 2464if (e.NewItems.Count != 1)
System\Windows\Data\CollectionView.cs (6)
1085if (PassesFilter(args.NewItems[0])) 1101if (PassesFilter(args.OldItems[0]) || PassesFilter(args.NewItems[0])) 1109if (PassesFilter(args.NewItems[0])) 1980if (e.NewItems.Count != 1) 1992if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 1997if (e.NewItems.Count != 1)
System\Windows\Data\ListCollectionView.cs (16)
1741BeginAddNew(args.NewItems[0], args.NewStartingIndex); 1749adjustedNewIndex = AdjustBefore(NotifyCollectionChangedAction.Add, args.NewItems[0], args.NewStartingIndex); 1886object newItem = (args.NewItems != null && args.NewItems.Count > 0) ? args.NewItems[0] : null; 1990args = new NotifyCollectionChangedEventArgs(effectiveAction, args.NewItems[0], args.OldItems[0], adjustedOldIndex); 2059args2 = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, args.NewItems, adjustedNewIndex); 2389ShadowCollection.Insert(e.NewStartingIndex, e.NewItems[0]); 2393ShadowCollection.Add(e.NewItems[0]); 2409ShadowCollection[e.OldStartingIndex] = e.NewItems[0]; 2416ShadowCollection[tempIndex] = e.NewItems[0]; 2423tempIndex = ShadowCollection.IndexOf(e.NewItems[0]); 2426ShadowCollection.Insert(e.NewStartingIndex, e.NewItems[0]); 2519if (e.NewItems.Count != 1) 2529if (e.NewItems.Count != 1 || e.OldItems.Count != 1) 2534if (e.NewItems.Count != 1)
System\Windows\Documents\DocumentSequence.cs (2)
728if (args.NewItems.Count != 1) 735object item = args.NewItems[0];
System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
603if (args.NewItems.Count != 1) 609object item = args.NewItems[0];
System\Windows\ResourceDictionary.cs (5)
1855(e.NewItems != null && e.NewItems.Count > 0) || 1885newDictionaries = new List<ResourceDictionary>(e.NewItems.Count); 1887for (int i = 0; i < e.NewItems.Count; i++) 1889mergedDictionary = (ResourceDictionary)e.NewItems[i];