ObservableCollection<T>.OnCollectionChanged Método

Definição

Levanta o CollectionChanged evento com os argumentos apresentados.

protected:
 virtual void OnCollectionChanged(System::Collections::Specialized::NotifyCollectionChangedEventArgs ^ e);
protected virtual void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e);
abstract member OnCollectionChanged : System.Collections.Specialized.NotifyCollectionChangedEventArgs -> unit
override this.OnCollectionChanged : System.Collections.Specialized.NotifyCollectionChangedEventArgs -> unit
Protected Overridable Sub OnCollectionChanged (e As NotifyCollectionChangedEventArgs)

Parâmetros

e
NotifyCollectionChangedEventArgs

Argumentos sobre o evento ser levantado.

Exemplos

Ao sobrepor este método, pode chamar a implementação base ou usar o BlockReentrancy método para lidar com alterações na recolha de reentrantes, como no seguinte exemplo:

using (BlockReentrancy())
{
    // OnCollectionChanged call
}
Using BlockReentrancy()
    ' OnCollectionChanged call
End Using

Observações

Propriedades e métodos que modificam esta coleção elevam o CollectionChanged evento através deste virtual método.

Aplica-se a