Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Adds a tool window to the generated designer for a domain-specific language.
Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll)
Syntax
'Declaration
Protected Sub AddToolWindow ( _
    toolWindowType As Type _
)
protected void AddToolWindow(
    Type toolWindowType
)
protected:
void AddToolWindow(
    Type^ toolWindowType
)
member AddToolWindow : 
        toolWindowType:Type -> unit
protected function AddToolWindow(
    toolWindowType : Type
)
Parameters
- toolWindowType 
 Type: System.Type- The type of tool window to add. 
Remarks
If your package supports tool windows, you should call this method when the ModelingPackage class is initialized.
Only single-instance tool windows are supported. Therefore, a 1:1 mapping always results.
Instances of tool windows are created on demand.
Examples
The following example registers a custom tool window that is defined in the CustomToolWindow class.
protected override void Initialize()
  {
     //Initializes the base class for the package 
     base.Initialize();
     //Registers a custom tool window
     this.AddToolWindow(typeof(CustomToolWindow));
  }
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.