Package.ToolboxInitialized Event

Event generated whenever Visual Studio initializes its Toolbox.

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


Protected Event ToolboxInitialized As EventHandler
protected event EventHandler ToolboxInitialized
 event EventHandler^ ToolboxInitialized {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
member ToolboxInitialized : IEvent<EventHandler,
JScript does not support events.


The Visual Studio IDE generates a ToolboxInitialized event whenever one or more of the following situations occur:

  1. A user manually resets the Toolbox by right-clicking on one of the Toolbox categories and selection Reset Toolbox.

  2. A new VSPackage providing Toolbox items is registered.

  3. A VSPackage programmatically generates a ToolboxInitialized event through the Visual Studio SDK by a VSPackage calling ResetDefaults with PKGRF_TOOLBOXITEMS.

                IVsUIShell uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
                IVsPackage pkg = GetService(typeof(Package)) as IVsPackage;

For more information on handling a ToolboxInitialized event and providing custom Toolbox items, see Advanced Toolbox Control Development.

.NET Framework Security

See Also


Package Class

Microsoft.VisualStudio.Shell Namespace