Package.CreateToolWindow Method
Creates a tool window of the specified type with the specified ID.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'宣告
Protected Function CreateToolWindow ( _
toolWindowType As Type, _
id As Integer _
) As WindowPane
protected WindowPane CreateToolWindow(
Type toolWindowType,
int id
)
Parameters
- toolWindowType
Type: System.Type
The type of tool window to create.
- id
Type: System.Int32
The tool window ID. This is 0 for a single-instance tool window.
Return Value
Type: Microsoft.VisualStudio.Shell.WindowPane
An instance of the requested tool window.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | toolWindowType is null. |
ArgumentException |
|
Remarks
The CreateToolWindow method creates an instance of the given tool window. This is used within the Package base class when implementing the Visual Studio interface tool window creation code as well as the FindToolWindow method.
.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.