Package.CreateToolWindow Method

Definition

Overloads

CreateToolWindow(Type, Int32, UInt32)

Creates a tool window of the specified type with the specified ID.

CreateToolWindow(Type, Int32, Object)

Create a tool window of the specified type with the specified ID.

CreateToolWindow(Type, Int32, UInt32, Object, Guid)

Create a tool window of the specified type with the specified ID. This is the only method that should be calling IVsUiShell.CreateToolWindow()

CreateToolWindow(Guid, Int32)

Creates a tool window of the specified type with the specified ID.

CreateToolWindow(Type, Int32)

Creates a tool window of the specified type with the specified ID.

CreateToolWindow(Type, Int32, UInt32)

Creates a tool window of the specified type with the specified ID.

protected:
 Microsoft::VisualStudio::Shell::WindowPane ^ CreateToolWindow(Type ^ toolWindowType, int id, System::UInt32 flags);
protected Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id, uint flags);
member this.CreateToolWindow : Type * int * uint32 -> Microsoft.VisualStudio.Shell.WindowPane
Protected Function CreateToolWindow (toolWindowType As Type, id As Integer, flags As UInteger) As WindowPane

Parameters

toolWindowType
Type

Type of the window to be created

id
Int32

Instance ID or 0 for single instance toolwindows

flags
UInt32

The window flags from __VSCREATETOOLWIN to be passed to IVsUiShell.CreateToolWindow

Returns

An instance of a class derived from ToolWindowPane

Applies to

CreateToolWindow(Type, Int32, Object)

Create a tool window of the specified type with the specified ID.

protected:
 virtual Microsoft::VisualStudio::Shell::WindowPane ^ CreateToolWindow(Type ^ toolWindowType, int id, System::Object ^ context);
protected virtual Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id, object context);
abstract member CreateToolWindow : Type * int * obj -> Microsoft.VisualStudio.Shell.WindowPane
override this.CreateToolWindow : Type * int * obj -> Microsoft.VisualStudio.Shell.WindowPane
Protected Overridable Function CreateToolWindow (toolWindowType As Type, id As Integer, context As Object) As WindowPane

Parameters

toolWindowType
Type

Type of the window to be created

id
Int32

Instance ID or 0 for single instance toolwindows

context
Object

Tool window creation context (passed to ToolWindowPane constructor)

Returns

An instance of a class derived from ToolWindowPane

Applies to

CreateToolWindow(Type, Int32, UInt32, Object, Guid)

Create a tool window of the specified type with the specified ID. This is the only method that should be calling IVsUiShell.CreateToolWindow()

protected Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id, uint flags, object context, Guid persistenceGuid = default);
member this.CreateToolWindow : Type * int * uint32 * obj * Guid -> Microsoft.VisualStudio.Shell.WindowPane
Protected Function CreateToolWindow (toolWindowType As Type, id As Integer, flags As UInteger, context As Object, Optional persistenceGuid As Guid = Nothing) As WindowPane

Parameters

toolWindowType
Type

Type of the window to be created

id
Int32

Instance ID or 0 for single instance toolwindows

flags
UInt32

The window flags from __VSCREATETOOLWIN to be passed to IVsUiShell.CreateToolWindow

context
Object

Tool window creation context (passed to ToolWindowPane constructor)

persistenceGuid
Guid

The persistence Guid for the tool window. If this is unspecified or matches Empty, toolWindowType's GUID property is used as the persistence Guid.

Returns

An instance of a class derived from ToolWindowPane

Applies to

CreateToolWindow(Guid, Int32)

Creates a tool window of the specified type with the specified ID.

protected:
 virtual int CreateToolWindow(Guid % toolWindowType, int id);
protected virtual int CreateToolWindow (ref Guid toolWindowType, int id);
abstract member CreateToolWindow : Guid * int -> int
override this.CreateToolWindow : Guid * int -> int
Protected Overridable Function CreateToolWindow (ByRef toolWindowType As Guid, id As Integer) As Integer

Parameters

toolWindowType
Guid

Type of the window to be created

id
Int32

Instance ID or 0 for single instance toolwindows

Returns

HRESULT for toolwindow creation

Applies to

CreateToolWindow(Type, Int32)

Creates a tool window of the specified type with the specified ID.

protected:
 virtual Microsoft::VisualStudio::Shell::WindowPane ^ CreateToolWindow(Type ^ toolWindowType, int id);
protected virtual Microsoft.VisualStudio.Shell.WindowPane CreateToolWindow (Type toolWindowType, int id);
abstract member CreateToolWindow : Type * int -> Microsoft.VisualStudio.Shell.WindowPane
override this.CreateToolWindow : Type * int -> Microsoft.VisualStudio.Shell.WindowPane
Protected Overridable Function CreateToolWindow (toolWindowType As Type, id As Integer) As WindowPane

Parameters

toolWindowType
Type

Type of the window to be created

id
Int32

Instance ID or 0 for single instance toolwindows

Returns

An instance of a class derived from ToolWindowPane

Exceptions

toolWindowType is null.

id is less than 0. toolWindowType is not derived from ToolWindowPane type.

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.

Applies to