174 references to Action
Microsoft.Maui.Controls (22)
BindableLayout\BindableLayout.cs (1)
509 if (e.Action == NotifyCollectionChangedAction.Replace)
Element\Element.cs (1)
849 switch (e.Action)
GestureElement.cs (1)
36 switch (args.Action)
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)
317 switch (e.Action) 338 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)
292 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.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)
389switch (args.Action) 397if (args.Action == NotifyCollectionChangedAction.Add) 411args.Action, TraceLog.IdFor(item)); 426if (args.Action == NotifyCollectionChangedAction.Add) 432else if (args.Action == NotifyCollectionChangedAction.Remove) 439args = new NotifyCollectionChangedEventArgs(args.Action, item, index); 443if (args.Action == NotifyCollectionChangedAction.Add) 451Debug.Assert(args.Action == NotifyCollectionChangedAction.Remove); 458if (args.Action == NotifyCollectionChangedAction.Add) 466Invariant.Assert(args.Action == NotifyCollectionChangedAction.Remove); 507args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems, args.OldItems, startingIndex); 579args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems, newStartingIndex, oldStartingIndex); 611_traceLog?.Add("ProcessCollectionChanged action = {0}", args.Action); 642throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 714TraceLog.IdFor(sender), args.Action, TraceLog.IdFor(args.OldItems[0]), TraceLog.IdFor(args.NewItems[0])); 724switch (args.Action) 727TraceContainerCollectionChange(sender, args.Action, null, args.NewItems[0]); 735args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], flatNewIndex); 739TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], null); 747args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatOldIndex); 751TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 755args = new NotifyCollectionChangedEventArgs(args.Action, args.NewItems[0], args.OldItems[0], flatOldIndex); 759TraceContainerCollectionChange(sender, args.Action, args.OldItems[0], args.NewItems[0]); 772args = new NotifyCollectionChangedEventArgs(args.Action, args.OldItems[0], flatNewIndex, flatOldIndex); 778TraceLog.IdFor(sender), args.Action); 785throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 1430switch (e.Action) 1458throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
MS\Internal\Data\EnumerableCollectionView.cs (1)
399switch (args.Action)
System\Windows\Annotations\Annotation.cs (6)
701switch (e.Action) 733throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 755switch (e.Action) 787throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 804switch (e.Action) 836throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\DataGrid.cs (14)
224switch (e.Action) 256visibleColumnsChanged |= (e.Action == NotifyCollectionChangedAction.Reset); 266if (visibleColumnsChanged && e.Action != NotifyCollectionChangedAction.Move) 945switch (e.Action) 5334if (e.Action == NotifyCollectionChangedAction.Reset) 5344if (e.Action == NotifyCollectionChangedAction.Remove || e.Action == NotifyCollectionChangedAction.Replace) 5351else if (e.Action == NotifyCollectionChangedAction.Reset) 7241switch (e.Action) 7386switch (e.Action) 7646if (e.Action == NotifyCollectionChangedAction.Add) 7654else if ((e.Action == NotifyCollectionChangedAction.Remove) || (e.Action == NotifyCollectionChangedAction.Replace)) 7669else if (e.Action == NotifyCollectionChangedAction.Reset)
System\Windows\Controls\DataGridColumnCollection.cs (1)
85switch (e.Action)
System\Windows\Controls\DataGridColumnHeaderCollection.cs (5)
207switch (e.Action) 210newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), e.NewStartingIndex); 214newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.OldStartingIndex); 218newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.OldItems), e.NewStartingIndex, e.OldStartingIndex); 222newArgs = new NotifyCollectionChangedEventArgs(e.Action, HeadersFromColumns(e.NewItems), HeadersFromColumns(e.OldItems), e.OldStartingIndex);
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
691switch (e.Action)
System\Windows\Controls\GridViewRowPresenter.cs (2)
363if (e.Action == NotifyCollectionChangedAction.Move) 369switch (e.Action)
System\Windows\Controls\ItemCollection.cs (2)
2168switch (e.Action) 2229throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\ItemContainerGenerator.cs (3)
2385if (sender != ItemsInternal && args.Action != NotifyCollectionChangedAction.Reset) 2388switch (args.Action) 2427throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action));
System\Windows\Controls\ItemsControl.cs (2)
302if (e.Action == NotifyCollectionChangedAction.Reset) 3684switch (e.Action)
System\Windows\Controls\MultipleCopiesCollection.cs (1)
46switch (e.Action)
System\Windows\Controls\Primitives\DataGridCellsPresenter.cs (1)
346e.Action != NotifyCollectionChangedAction.Reset || columns.Count == 0,
System\Windows\Controls\Primitives\GridViewRowPresenterBase.cs (3)
147if (e.Action == NotifyCollectionChangedAction.Remove 148|| e.Action == NotifyCollectionChangedAction.Replace) 164else if (e.Action == NotifyCollectionChangedAction.Reset)
System\Windows\Controls\Primitives\Selector.cs (6)
869switch (e.Action) 912throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 1103if (e.Action == NotifyCollectionChangedAction.Reset || 1104(e.Action == NotifyCollectionChangedAction.Add && 1138switch (e.Action) 1242throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\TabControl.cs (1)
379if (e.Action == NotifyCollectionChangedAction.Remove && SelectedIndex == -1)
System\Windows\Controls\TreeView.cs (2)
412switch (e.Action) 439throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\TreeViewItem.cs (2)
942switch (e.Action) 979throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Controls\VirtualizedCellInfoCollection.cs (1)
947switch (e.Action)
System\Windows\Data\BindingGroup.cs (1)
1300switch (e.Action)
System\Windows\Data\BindingListCollectionView.cs (7)
1496switch (args.Action) 1557throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 1809switch (e.Action) 2294if (e.Action == NotifyCollectionChangedAction.Add) 2298else if (e.Action == NotifyCollectionChangedAction.Remove) 2430switch (e.Action) 2458throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Data\CollectionView.cs (6)
919if (args.Action != NotifyCollectionChangedAction.Replace && 920args.Action != NotifyCollectionChangedAction.Move) 1078switch (args.Action) 1886if (args.Action == NotifyCollectionChangedAction.Reset) 1948switch (e.Action) 1978throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action));
System\Windows\Data\ListCollectionView.cs (17)
1664switch (args.Action) 1680if (args.Action != NotifyCollectionChangedAction.Reset) 1682if (args.Action != NotifyCollectionChangedAction.Remove && args.NewStartingIndex < 0 1683|| args.Action != NotifyCollectionChangedAction.Add && args.OldStartingIndex < 0) 1696if (args.Action == NotifyCollectionChangedAction.Reset) 1719if (args.Action == NotifyCollectionChangedAction.Add && _newItemIndex == -2) 1728if (args.Action != NotifyCollectionChangedAction.Remove) 1735if (args.Action != NotifyCollectionChangedAction.Add) 1748switch (args.Action) 1809NotifyCollectionChangedAction effectiveAction = args.Action; 1821if (args.Action != NotifyCollectionChangedAction.Add) 2365switch (e.Action) 2411throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 2497switch (e.Action) 2525throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, e.Action)); 2987if (e.Action == NotifyCollectionChangedAction.Add) 2991else if (e.Action == NotifyCollectionChangedAction.Remove)
System\Windows\Documents\DocumentSequence.cs (2)
713if (args.Action == NotifyCollectionChangedAction.Add) 747throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action));
System\Windows\Documents\DocumentSequenceTextContainer.cs (3)
591if (args.Action == NotifyCollectionChangedAction.Add) 604throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action)); 634throw new NotSupportedException(SR.Format(SR.UnexpectedCollectionChangeAction, args.Action));
System\Windows\ResourceDictionary.cs (5)
1890if (e.Action != NotifyCollectionChangedAction.Reset) 1902if (e.Action == NotifyCollectionChangedAction.Remove 1903|| e.Action == NotifyCollectionChangedAction.Replace) 1920if (e.Action == NotifyCollectionChangedAction.Add 1921|| e.Action == NotifyCollectionChangedAction.Replace)
System.Windows.Controls.Ribbon (8)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (5)
1082if (e.Action == NotifyCollectionChangedAction.Remove || 1083e.Action == NotifyCollectionChangedAction.Replace || 1084e.Action == NotifyCollectionChangedAction.Reset) 1090e.Action == NotifyCollectionChangedAction.Move || 1091e.Action == NotifyCollectionChangedAction.Remove)
Microsoft\Windows\Controls\Ribbon\RibbonGallery.cs (1)
2403switch (e.Action)
Microsoft\Windows\Controls\Ribbon\RibbonGalleryCategory.cs (1)
537switch (e.Action)
Microsoft\Windows\Controls\Ribbon\RibbonTab.cs (1)
318switch (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);