ProvideToolWindowAttribute Class

 

Notifies Visual Studio that a VSPackage owns a tool window.

Namespace:   Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

System.Object
  System.Attribute
    Microsoft.VisualStudio.Shell.RegistrationAttribute
      Microsoft.VisualStudio.Shell.ProvideToolWindowAttribute

[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, 
	Inherited = true)]
public sealed class ProvideToolWindowAttribute : RegistrationAttribute

NameDescription
System_CAPS_pubmethodProvideToolWindowAttribute(Type)

Initializes a new instance of ProvideToolWindowAttribute.

NameDescription
System_CAPS_pubpropertyDockedHeight

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

System_CAPS_pubpropertyDockedWidth

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

System_CAPS_pubpropertyDocumentLikeTool

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.

System_CAPS_pubpropertyHeight

Gets or sets the default height of the tool window.

System_CAPS_pubpropertyMultiInstances

Determines whether multiple instances of the tool window are allowed.

System_CAPS_pubpropertyOrientation

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

System_CAPS_pubpropertyPositionX

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

System_CAPS_pubpropertyPositionY

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

System_CAPS_pubpropertyStyle

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

System_CAPS_pubpropertyToolType

Gets or sets the type of the tool window.

System_CAPS_pubpropertyTransient

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

System_CAPS_pubpropertyTypeId

Gets the current instance of this attribute.(Inherited from RegistrationAttribute.)

System_CAPS_pubpropertyWidth

Gets or sets the default width of the tool window.

System_CAPS_pubpropertyWindow

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

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

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.

  • 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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: