ProvideToolWindowAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type ProvideToolWindowAttribute = class
inherit RegistrationAttribute
Public NotInheritable Class ProvideToolWindowAttribute
Inherits RegistrationAttribute
- Inheritance
- 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) |
Initializes a new instance of ProvideToolWindowAttribute. |
Properties
AutoHidden |
Set to true to hide the tool window by default. |
DockedHeight |
Gets ore sets the default height of the ToolWindow when docked. |
DockedWidth |
Gets ore sets the default width of the ToolWindow when docked. |
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 |
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 |
Override the TypeID property in order to let the RegistrationAttribute derived classes to work with System.ComponentModel.TypeDescriptor.GetAttributes(...). An attribute derived from this one will have to override this property only if it needs a better control on the instances that can be applied to a class. (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. |
Methods
GetPackageRegKeyPath(Guid) |
Gets the registry path (relative to the registry root of the application) of the VSPackage. (Inherited from RegistrationAttribute) |
Register(RegistrationAttribute+RegistrationContext) |
Registers the tool window. |
Unregister(RegistrationAttribute+RegistrationContext) |
Removes the registry key for the tool window. |