ObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs) ObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs) ObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs) ObservableCollection<T>.OnCollectionChanged(NotifyCollectionChangedEventArgs) Method

定義

指定された引数を使用して、CollectionChanged イベントを発生させます。Raises the CollectionChanged event with the provided arguments.

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)

パラメーター

e
NotifyCollectionChangedEventArgs NotifyCollectionChangedEventArgs NotifyCollectionChangedEventArgs NotifyCollectionChangedEventArgs

発生しているイベントの引数。Arguments of the event being raised.

基本実装を呼び出すか、使用してこのメソッドをオーバーライドするときに、BlockReentrancy次の例のように、再入可能なコレクションを処理するメソッドを変更します。When overriding this method, either call the base implementation or use the BlockReentrancy method to handle reentrant collection changes, as in the following example:

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

注釈

このコレクションの発生を変更するプロパティとメソッド、CollectionChangedこれを通じてイベントをvirtualメソッド。Properties and methods that modify this collection raise the CollectionChanged event through this virtual method.

適用対象