ObservableCollection<T>.OnCollectionChanged Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
Parameters
Arguments of the event being raised.
Examples
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
Remarks
Properties and methods that modify this collection raise the CollectionChanged event through this virtual
method.
Applies to
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.