Freigeben über


GlobalObjectProvider.OnCollectionChanged Method

Raises the CollectionChanged event.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
Protected Overridable Sub OnCollectionChanged ( _
    e As EventArgs _
)
'Usage
Dim e As EventArgs

Me.OnCollectionChanged(e)
protected virtual void OnCollectionChanged(
    EventArgs e
)
protected:
virtual void OnCollectionChanged(
    EventArgs^ e
)
abstract OnCollectionChanged : 
        e:EventArgs -> unit 
override OnCollectionChanged : 
        e:EventArgs -> unit 
protected function OnCollectionChanged(
    e : EventArgs
)

Parameters

Remarks

Unlike the BindingsCollection.OnCollectionChanging method, there is no such corresponding method in the GlobalObjectProvider class.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

The OnCollectionChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnCollectionChanged in a derived class, be sure to call the base class’s OnCollectionChanged method so that registered delegates receive the event.

.NET Framework Security

See Also

Reference

GlobalObjectProvider Class

GlobalObjectProvider Members

Microsoft.VisualStudio.Shell.Design Namespace

CollectionChanged