Package.Initialize 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.
Called when the VSPackage is loaded by Visual Studio.
protected:
virtual void Initialize();
protected:
virtual void Initialize();
virtual void Initialize();
protected virtual void Initialize ();
abstract member Initialize : unit -> unit
override this.Initialize : unit -> unit
Protected Overridable Sub Initialize ()
Remarks
Override Initialize
when you need to carry out additional steps (such as Editor Factory registration) when the VSPackage is loaded by Visual Studio.
Place any initialization steps that require access to the global service provider (such as Editor Factory registration) in the Initialize
method.
In contrast, steps such as adding services, adding option keys, and toolbox event handlers should be placed in the Package constructor method.