다음을 통해 공유


Package.ToolboxUpgraded Event

Event generated whenever Visual Studio upgrades its Toolbox.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

‘선언
Protected Event ToolboxUpgraded As EventHandler
‘사용 방법
Dim handler As EventHandler

AddHandler Me.ToolboxUpgraded, handler
protected event EventHandler ToolboxUpgraded
protected:
 event EventHandler^ ToolboxUpgraded {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
member ToolboxUpgraded : IEvent<EventHandler,
    EventArgs>
JScript does not support events.

Remarks

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

  1. The version number of an existing Toolbox item provider supplied by a VSPackage changes.

    The Toolbox item provider version number of a VSPackage is set by the version argument of the ProvideToolboxItemsAttribute object that must be applied to any VSPackage providing Toolbox items.

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

                IVsUIShell uiShell = (IVsUIShell)GetService(typeof(SVsUIShell));
                IVsPackage pkg = GetService(typeof(Package)) as IVsPackage;
                pkg.ResetDefaults((uint)__VSPKGRESETFLAGS. PKGRF_TOOLBOXSETUP);
    

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

.NET Framework Security

See Also

Reference

Package Class

Package Members

Microsoft.VisualStudio.Shell Namespace