197 references to Action
Microsoft.Maui.Controls (38)
BindableLayout\BindableLayout.cs (1)
499 if (e.Action == NotifyCollectionChangedAction.Replace)
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (2)
550 if (Control.IndexPathsForVisibleRows == null && e.Action != NotifyCollectionChangedAction.Reset) 565 switch (e.Action)
Compatibility\Handlers\Shell\iOS\ShellSearchResultsRenderer.cs (1)
185 switch (e.Action)
Element\Element.cs (1)
849 switch (e.Action)
GestureElement.cs (1)
36 switch (args.Action)
Handlers\Items\iOS\CarouselViewController.cs (3)
318 if (e.Action == NotifyCollectionChangedAction.Remove) 323 if (e.Action == NotifyCollectionChangedAction.Reset) 328 if (e.Action == NotifyCollectionChangedAction.Add)
Handlers\Items\iOS\ObservableGroupedSource.cs (1)
176 switch (args.Action)
Handlers\Items\iOS\ObservableItemsSource.cs (2)
136 switch (args.Action) 183 if (args.Action == NotifyCollectionChangedAction.Remove)
Handlers\Items2\iOS\CarouselViewController2.cs (4)
238 if (e.Action == NotifyCollectionChangedAction.Remove) 243 if (e.Action == NotifyCollectionChangedAction.Reset) 248 if (e.Action == NotifyCollectionChangedAction.Add) 270 if (e.Action == NotifyCollectionChangedAction.Reset)
Handlers\Items2\iOS\LoopObservableItemsSource2.cs (3)
35 if (args.Action == NotifyCollectionChangedAction.Reset) 39 if (args.Action == NotifyCollectionChangedAction.Add) 46 if (args.Action == NotifyCollectionChangedAction.Remove)
Internals\NotifyCollectionChangedEventArgsExtensions.cs (3)
36 switch (self.Action) 87 return self.Action; 93 switch (e.Action)
Items\MarshalingObservableCollection.cs (2)
54 if (args.Action == NotifyCollectionChangedAction.Reset) 70 switch (args.Action)
Label\Label.cs (2)
316 switch (e.Action) 337 switch (e.Action)
LegacyLayouts\Layout.cs (1)
619 if (e.Action == NotifyCollectionChangedAction.Move)
MultiPage.cs (1)
223 switch (e.Action)
ObservableWrapper.cs (1)
178 switch (e.Action)
Picker\Picker.cs (1)
291 switch (e.Action)
ResourceDictionary.cs (3)
99 switch (e.Action) 111 if (e.Action == NotifyCollectionChangedAction.Move) 116 if (e.Action == NotifyCollectionChangedAction.Reset)
TemplatedItemsList.cs (4)
798 switch (e.Action) 1006 switch (e.Action) 1165 switch (e.Action) 1341 switch (e.Action)
View\View.cs (1)
121 switch (args.Action)
Microsoft.Maui.Controls.Compatibility (7)
iOS\CollectionView\CarouselViewController.cs (3)
218 if (e.Action == NotifyCollectionChangedAction.Remove) 221 if (e.Action == NotifyCollectionChangedAction.Reset) 224 if (e.Action == NotifyCollectionChangedAction.Add)
iOS\CollectionView\ObservableGroupedSource.cs (1)
138 switch (args.Action)
iOS\CollectionView\ObservableItemsSource.cs (1)
112 switch (args.Action)
iOS\Renderers\ListViewRenderer.cs (2)
576 if (Control.IndexPathsForVisibleRows == null && e.Action != NotifyCollectionChangedAction.Reset) 591 switch (e.Action)
Microsoft.VisualStudio.LanguageServices (1)
ValueTracking\TreeViewItemBase.cs (1)
110if (args.Action is not NotifyCollectionChangedAction.Add and not NotifyCollectionChangedAction.Remove)
PresentationFramework (123)
MS\Internal\Data\CompositeCollectionView.cs (28)
390switch (args.Action) 398if (args.Action == NotifyCollectionChangedAction.Add) 412args.Action, TraceLog.IdFor(item)); 427if (args.Action == NotifyCollectionChangedAction.Add) 433else if (args.Action == NotifyCollectionChangedAction.Remove) 440args = new NotifyCollectionChangedEventArgs(args.Action, item, index); 444if (args.Action == NotifyCollectionChangedAction.Add) 452Debug.Assert(args.Action == NotifyCollectionChangedAction.Remove); 459if (args.Action == NotifyCollectionChangedAction.Add) 467Invariant.Assert(args.Action == NotifyCollectionChangedAction.Remove); 508args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems, args.OldItems, startingIndex); 580args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems, newStartingIndex, oldStartingIndex); 612_traceLog?.Add("ProcessCollectionChanged action = {0}", args.Action); 643throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 715TraceLog.IdFor(sender), args.Action, TraceLog.IdFor(args.OldItems[0]), TraceLog.IdFor(args.NewItems[0])); 725switch (args.Action) 728TraceContainerCollectionChange(sender, args.Action, null, args.NewItems[0]); 736args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], flatNewIndex); 740TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], null); 748args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatOldIndex); 752TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 756args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], args.OldItems[0], flatOldIndex); 760TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 773args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatNewIndex, flatOldIndex); 779TraceLog.IdFor(sender), args.Action); 786throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 1431switch (e.Action) 1459throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
MS\Internal\Data\EnumerableCollectionView.cs (1)
400switch (args.Action)
System\Windows\Annotations\Annotation.cs (6)
702switch (e.Action) 734throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 756switch (e.Action) 788throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 805switch (e.Action) 837throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\DataGrid.cs (14)
225switch (e.Action) 257visibleColumnsChanged |= (e.Action == NotifyCollectionChangedAction.Reset); 267if (visibleColumnsChanged && e.Action != NotifyCollectionChangedAction.Move) 946switch (e.Action) 5341if (e.Action == NotifyCollectionChangedAction.Reset) 5351if (e.Action == NotifyCollectionChangedAction.Remove || e.Action == NotifyCollectionChangedAction.Replace) 5358else if (e.Action == NotifyCollectionChangedAction.Reset) 7248switch (e.Action) 7393switch (e.Action) 7653if (e.Action == NotifyCollectionChangedAction.Add) 7661else if ((e.Action == NotifyCollectionChangedAction.Remove) || (e.Action == NotifyCollectionChangedAction.Replace)) 7676else if (e.Action == NotifyCollectionChangedAction.Reset)
System\Windows\Controls\DataGridColumnCollection.cs (1)
86switch (e.Action)
System\Windows\Controls\DataGridColumnHeaderCollection.cs (5)
208switch (e.Action) 211newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), e.NewStartingIndex); 215newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.OldStartingIndex); 219newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.NewStartingIndex, e.OldStartingIndex); 223newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), HeadersFromColumns(e.OldItems), e.OldStartingIndex);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
692switch (e.Action)
System\Windows\Controls\GridViewRowPresenter.cs (2)
364if (e.Action == NotifyCollectionChangedAction.Move) 370switch (e.Action)
System\Windows\Controls\ItemCollection.cs (2)
2170switch (e.Action) 2231throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\ItemContainerGenerator.cs (3)
2388if (sender != ItemsInternal && args.Action != NotifyCollectionChangedAction.Reset) 2391switch (args.Action) 2430throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action));
System\Windows\Controls\ItemsControl.cs (2)
303if (e.Action == NotifyCollectionChangedAction.Reset) 3685switch (e.Action)
System\Windows\Controls\MultipleCopiesCollection.cs (1)
47switch (e.Action)
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
347e.Action != NotifyCollectionChangedAction.Reset || columns.Count == 0,
System\Windows\Controls\Primitives\GridViewRowPresenterBase.cs (3)
148if (e.Action == NotifyCollectionChangedAction.Remove 149|| e.Action == NotifyCollectionChangedAction.Replace) 165else if (e.Action == NotifyCollectionChangedAction.Reset)
System\Windows\Controls\Primitives\Selector.cs (6)
870switch (e.Action) 913throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 1104if (e.Action == NotifyCollectionChangedAction.Reset || 1105(e.Action == NotifyCollectionChangedAction.Add && 1139switch (e.Action) 1243throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\TabControl.cs (1)
380if (e.Action == NotifyCollectionChangedAction.Remove && SelectedIndex == -1)
System\Windows\Controls\TreeView.cs (2)
413switch (e.Action) 440throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\TreeViewItem.cs (2)
943switch (e.Action) 980throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
948switch (e.Action)
System\Windows\Data\BindingGroup.cs (1)
1301switch (e.Action)
System\Windows\Data\BindingListCollectionView.cs (7)
1497switch (args.Action) 1558throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 1810switch (e.Action) 2295if (e.Action == NotifyCollectionChangedAction.Add) 2299else if (e.Action == NotifyCollectionChangedAction.Remove) 2431switch (e.Action) 2459throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Data\CollectionView.cs (6)
920if (args.Action != NotifyCollectionChangedAction.Replace && 921args.Action != NotifyCollectionChangedAction.Move) 1079switch (args.Action) 1887if (args.Action == NotifyCollectionChangedAction.Reset) 1949switch (e.Action) 1979throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Data\ListCollectionView.cs (17)
1665switch (args.Action) 1681if (args.Action != NotifyCollectionChangedAction.Reset) 1683if (args.Action != NotifyCollectionChangedAction.Remove && args.NewStartingIndex < 0 1684|| args.Action != NotifyCollectionChangedAction.Add && args.OldStartingIndex < 0) 1697if (args.Action == NotifyCollectionChangedAction.Reset) 1720if (args.Action == NotifyCollectionChangedAction.Add && _newItemIndex == -2) 1729if (args.Action != NotifyCollectionChangedAction.Remove) 1736if (args.Action != NotifyCollectionChangedAction.Add) 1749switch (args.Action) 1810NotifyCollectionChangedAction effectiveAction = args.Action; 1822if (args.Action != NotifyCollectionChangedAction.Add) 2366switch (e.Action) 2412throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 2498switch (e.Action) 2526throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 2988if (e.Action == NotifyCollectionChangedAction.Add) 2992else if (e.Action == NotifyCollectionChangedAction.Remove)
System\Windows\Documents\DocumentSequence.cs (2)
714if (args.Action == NotifyCollectionChangedAction.Add) 748throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action));
System\Windows\Documents\DocumentSequenceTextContainer.cs (3)
592if (args.Action == NotifyCollectionChangedAction.Add) 605throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 635throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action));
System\Windows\ResourceDictionary.cs (5)
1851if (e.Action != NotifyCollectionChangedAction.Reset) 1863if (e.Action == NotifyCollectionChangedAction.Remove 1864|| e.Action == NotifyCollectionChangedAction.Replace) 1881if (e.Action == NotifyCollectionChangedAction.Add 1882|| e.Action == NotifyCollectionChangedAction.Replace)
System.Windows.Controls.Ribbon (8)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (5)
1086if (e.Action == NotifyCollectionChangedAction.Remove || 1087e.Action == NotifyCollectionChangedAction.Replace || 1088e.Action == NotifyCollectionChangedAction.Reset) 1094e.Action == NotifyCollectionChangedAction.Move || 1095e.Action == NotifyCollectionChangedAction.Remove)
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (1)
2410switch (e.Action)
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (1)
538switch (e.Action)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
319switch (e.Action)
WindowsBase.Tests (20)
System\ComponentModel\SortDescriptionCollectionTests.cs (20)
90Assert.Equal(NotifyCollectionChangedAction.Remove, events[0].Action); 95Assert.Equal(NotifyCollectionChangedAction.Add, events[1].Action); 176Assert.Equal(NotifyCollectionChangedAction.Add, events[0].Action); 190Assert.Equal(NotifyCollectionChangedAction.Add, events[1].Action); 255Assert.Equal(NotifyCollectionChangedAction.Add, events[0].Action); 269Assert.Equal(NotifyCollectionChangedAction.Add, events[1].Action); 344Assert.Equal(NotifyCollectionChangedAction.Add, events[0].Action); 358Assert.Equal(NotifyCollectionChangedAction.Add, events[1].Action); 424Assert.Equal(NotifyCollectionChangedAction.Reset, events[0].Action); 437Assert.Equal(NotifyCollectionChangedAction.Reset, events[2].Action); 447Assert.Equal(NotifyCollectionChangedAction.Reset, events[3].Action); 496Assert.Equal(NotifyCollectionChangedAction.Reset, events[0].Action); 509Assert.Equal(NotifyCollectionChangedAction.Reset, events[2].Action); 519Assert.Equal(NotifyCollectionChangedAction.Reset, events[3].Action); 582Assert.Equal(NotifyCollectionChangedAction.Remove, events[0].Action); 594Assert.Equal(NotifyCollectionChangedAction.Remove, events[1].Action); 668Assert.Equal(NotifyCollectionChangedAction.Remove, events[0].Action); 680Assert.Equal(NotifyCollectionChangedAction.Remove, events[1].Action); 746Assert.Equal(NotifyCollectionChangedAction.Remove, events[0].Action); 751Assert.Equal(NotifyCollectionChangedAction.Add, events[1].Action);