ProvideToolWindowAttribute ProvideToolWindowAttribute ProvideToolWindowAttribute ProvideToolWindowAttribute ProvideToolWindowAttribute Class

Definition

Notifies Visual Studio that a VSPackage owns a tool window.

public ref class ProvideToolWindowAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class ProvideToolWindowAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvideToolWindowAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
type ProvideToolWindowAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class ProvideToolWindowAttribute
Inherits RegistrationAttribute
Inheritance
ProvideToolWindowAttributeProvideToolWindowAttributeProvideToolWindowAttributeProvideToolWindowAttributeProvideToolWindowAttribute
Attributes

Remarks

When to Call

Implement the ProvideToolWindowAttribute class when a VSPackage implements one or more tool windows.

Basic Usage

This attribute declares that a specific VSPackage owns a tool window. It also helps determine the positioning and persistence of the tool window when it is created. To use ProvideToolWindowAttribute, place it on a package class derived from Package or implementing IVsPackage.

This attribute is only used to provide data for external registration tools. It does not have any effect on the runtime behavior of the VSPackage.

Registry Entries

  • The ProvideToolWindowAttribute class creates the following registry entries:

  • <VSROOT>\ToolWindows\{ToolWindowGuid}

  • <VSROOT>\ToolWindows\{ToolWindowGuid}\@={ToolWindowTypeGuid}

  • <VSROOT>\ToolWindows\{ToolWindowGuid}\Name=ToolWindowName

  • The following registry entries are optional:

  • <VSROOT>\ToolWindows\{ToolWindowGuid}\Float=FloatPosition

  • <VSROOT>\ToolWindows\{ToolWindowGuid}\Style=ToolWindowStyle

  • <VSROOT>\ToolWindows\{ToolWindowGuid}\Window=DockWith

  • <VSROOT>\ToolWindows\{ToolWindowGuid}\Orientation=ToolWindowOrientation

Constructors

ProvideToolWindowAttribute(Type) ProvideToolWindowAttribute(Type) ProvideToolWindowAttribute(Type) ProvideToolWindowAttribute(Type) ProvideToolWindowAttribute(Type)

Initializes a new instance of ProvideToolWindowAttribute.

Properties

DockedHeight DockedHeight DockedHeight DockedHeight DockedHeight

Gets ore sets the default height of the ToolWindow when docked.

DockedWidth DockedWidth DockedWidth DockedWidth DockedWidth

Gets ore sets the default width of the ToolWindow when docked.

DocumentLikeTool DocumentLikeTool DocumentLikeTool DocumentLikeTool DocumentLikeTool

Set this property to true if you want a tool window that is like a document in its behavior and lifetime. The tool window will only be MDI or floating and will remain visible in its position across all layout changes until manually closed by the user at which point it will be destroyed. This flag implies DontForceCreate and destructive multi instance.

Height Height Height Height Height

Gets or sets the default height of the tool window.

MultiInstances MultiInstances MultiInstances MultiInstances MultiInstances

Determines whether multiple instances of the tool window are allowed.

Orientation Orientation Orientation Orientation Orientation

Gets or sets the default orientation for the tool window relative to the window specified by the Window property.

PositionX PositionX PositionX PositionX PositionX

Gets or sets the default horizontal value of the top left corner of the tool window.

PositionY PositionY PositionY PositionY PositionY

Gets or sets the vertical value of the top left corner of the tool window.

Style Style Style Style Style

Gets or sets the default docking style for the tool window.

ToolType ToolType ToolType ToolType ToolType

Gets or sets the type of the tool window.

Transient Transient Transient Transient Transient

Gets or sets whether the tool window should not be reopened when the IDE restarts.

TypeId TypeId TypeId TypeId TypeId

Gets the current instance of this attribute.

(Inherited from RegistrationAttribute)
Width Width Width Width Width

Gets or sets the default width of the tool window.

Window Window Window Window Window

Gets or sets the GUID of the default window on which the tool window should be docked.

Methods

GetPackageRegKeyPath(Guid) GetPackageRegKeyPath(Guid) GetPackageRegKeyPath(Guid) GetPackageRegKeyPath(Guid) GetPackageRegKeyPath(Guid)

Gets the registry path (relative to the registry root of the application) of the VSPackage.

(Inherited from RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext) Register(RegistrationAttribute+RegistrationContext)

Registers the tool window.

Unregister(RegistrationAttribute+RegistrationContext) Unregister(RegistrationAttribute+RegistrationContext) Unregister(RegistrationAttribute+RegistrationContext) Unregister(RegistrationAttribute+RegistrationContext) Unregister(RegistrationAttribute+RegistrationContext)

Removes the registry key for the tool window.

Applies to