SelectionNodeBaseTOnSourceCollectionChanged Method

Called when the Source collection changes.

Definition

Namespace: Avalonia.Controls.Selection
Assembly: Avalonia.Controls (in Avalonia.Controls.dll) Version: 11.3.999
protected virtual void OnSourceCollectionChanged(
	NotifyCollectionChangedEventArgs e
)

Parameters

e  NotifyCollectionChangedEventArgs
The details of the collection change.

Remarks

The implementation in SelectionNodeBaseT calls OnItemsAdded(Int32, IList) and OnItemsRemoved(Int32, IList) in order to calculate how the collection change affects the currently selected items. It then calls OnIndexesChanged(Int32, Int32) and OnSelectionRemoved(Int32, Int32, IReadOnlyListT) if necessary, according to the SelectionNodeBaseTCollectionChangeState returned by those methods. Override this method and OnSourceCollectionChangeFinished to provide custom handling of source collection changes.

See Also