ProvideToolWindowAttribute Class
Notifies Visual Studio that a VSPackage owns a tool window.
Inheritance Hierarchy
System.Object
System.Attribute
Microsoft.VisualStudio.Shell.RegistrationAttribute
Microsoft.VisualStudio.Shell.ProvideToolWindowAttribute
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaration
<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple := True, Inherited := True)> _
Public NotInheritable Class ProvideToolWindowAttribute _
Inherits RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class ProvideToolWindowAttribute : RegistrationAttribute
[AttributeUsageAttribute(AttributeTargets::Class, AllowMultiple = true, Inherited = true)]
public ref class ProvideToolWindowAttribute sealed : public RegistrationAttribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = true, Inherited = true)>]
type ProvideToolWindowAttribute =
class
inherit RegistrationAttribute
end
public final class ProvideToolWindowAttribute extends RegistrationAttribute
The ProvideToolWindowAttribute type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ProvideToolWindowAttribute | Initializes a new instance of ProvideToolWindowAttribute. |
Top
Properties
Name | Description | |
---|---|---|
DockedHeight | ||
DockedWidth | ||
DocumentLikeTool | ||
Height | Gets or sets the default height of the tool window. | |
MultiInstances | Determines whether multiple instances of the tool window are allowed. | |
Orientation | Gets or sets the default orientation for the tool window relative to the window specified by the Window property. | |
PositionX | Gets or sets the default horizontal value of the top left corner of the tool window. | |
PositionY | Gets or sets the vertical value of the top left corner of the tool window. | |
Style | Gets or sets the default docking style for the tool window. | |
ToolType | Gets or sets the type of the tool window. | |
Transient | Gets or sets whether the tool window should not be reopened when the IDE restarts. | |
TypeId | Gets the current instance of this attribute. (Inherited from RegistrationAttribute.) | |
Width | Gets or sets the default width of the tool window. | |
Window | Gets or sets the GUID of the default window on which the tool window should be docked. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Infrastructure. Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute.) | |
GetHashCode | Returns the hash code for this instance. (Inherited from Attribute.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute.) | |
Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute.) | |
Register | Registers the tool window. (Overrides RegistrationAttribute.Register(RegistrationAttribute.RegistrationContext).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Unregister | Removes the registry key for the tool window. (Overrides RegistrationAttribute.Unregister(RegistrationAttribute.RegistrationContext).) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
_Attribute.GetIDsOfNames | Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from Attribute.) | |
_Attribute.GetTypeInfo | Retrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from Attribute.) | |
_Attribute.GetTypeInfoCount | Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from Attribute.) | |
_Attribute.Invoke | Provides access to properties and methods exposed by an object. (Inherited from Attribute.) |
Top
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
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.