ToolWindowPane Class

A default implementation for a tool window. It can be subclassed to implement a customized tool window.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Shell.WindowPane
    Microsoft.VisualStudio.Shell.ToolWindowPane

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

Syntax

'Declaration
<ComVisibleAttribute(True)> _
Public Class ToolWindowPane _
    Inherits WindowPane _
    Implements IVsWindowSearch
[ComVisibleAttribute(true)]
public class ToolWindowPane : WindowPane, 
    IVsWindowSearch
[ComVisibleAttribute(true)]
public ref class ToolWindowPane : public WindowPane, 
    IVsWindowSearch
[<ComVisibleAttribute(true)>]
type ToolWindowPane =  
    class 
        inherit WindowPane 
        interface IVsWindowSearch 
    end
public class ToolWindowPane extends WindowPane implements IVsWindowSearch

The ToolWindowPane type exposes the following members.

Constructors

  Name Description
Public method ToolWindowPane() Initializes a new instance of ToolWindowPane with a nulla null reference (Nothing in Visual Basic) service provider
Protected method ToolWindowPane(IServiceProvider) Initializes an instance of this class.

Top

Properties

  Name Description
Public property BitmapIndex Gets or sets the index of the image in the bitmap strip to use for the window frame icon.
Public property BitmapResourceID Gets or sets the resource ID for the bitmap strip from which to take the window frame icon.
Public property Caption Gets or sets the caption for the tool window.
Public property Content Gets or sets the content of this tool window. (Inherited from WindowPane.)
Public property Frame Gets or sets the IVsWindowFrame that hosts the ToolWindowPane.
Protected property InitializationMode Gets the initialization mode that is associated with this window pane. (Inherited from WindowPane.)
Public property Package Gets or sets the package that owns the tool window.
Public property SearchCategory Gets the search category that is used for storing MRU items. if the window search implementation for your tool window supporst most-recently-used search strings. By default, the toolwindow guid is used for the search category.
Public property SearchEnabled Override this if you want to support search in your window. You must also override other functions from the IVsWindowSearch interface, like CreateSearch, etc.
Public property SearchFiltersEnum Override this function if the tool window supports search filters. The class < WindowSearchFilterEnumerator can be used to construct an enumerator over an array of search filters that implement the IVsWindowSearchFilter interface.
Public property SearchHost Gets the search host implementation associated with this tool window.
Public property SearchOptionsEnum Override this function if the tool window supports search options. The class T:Microsoft.VisualStudio.PlatformUI.WindowSearchOptionEnumerator can be used to construct an enumerator over an array of search options implementing the IVsWindowSearchOption interface.
Public property ToolBar Gets or sets the CommandID.
Public property ToolBarCommandTarget If the tool window has a ToolBar, then you can use this property to customize its command target. If this value is null, then the window frame of this tool window is used as the command target for the ToolBar. Like other toolbar-related properties, this property must be set before the initialization of the ToolWindowPane is complete.
Public property ToolBarDropTarget Gets or sets the toolbar drop target.
Public property ToolBarLocation Gets or sets the location of the toolbar in the tool window.
Public property ToolClsid Gets or sets the CLSID of a tool that should be used for this tool window.
Public property Window Gets the window associated with this window pane. (Inherited from WindowPane.)

Top

Methods

  Name Description
Public method ClearSearch Clears the pane of the results from a previously completed or partial search.
Public method CreateSearch Override at least this function if you need to support search in a tool window.
Public method Dispose() Disposes the window pane and its resources. (Inherited from WindowPane.)
Protected method Dispose(Boolean) Disposes the resources of the window pane. (Inherited from WindowPane.)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetIVsWindowPane Gets the IVsWindowPane that is associated with the tool window.
Protected method GetService Gets the service of the specified type. (Inherited from WindowPane.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Initialize Initializes services after the window pane has been sited. (Inherited from WindowPane.)
Public method LoadUIState Override to load the previously saved state of the pane. (Inherited from WindowPane.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnClose Raised when the window is closed. (Inherited from WindowPane.)
Protected method OnCreate Raised when the window pane is created. (Inherited from WindowPane.)
Public method OnNavigationKeyDown Allows the pane to intercept certain keys after a search is started, and to navigate between the results or select one of the results displayed in the pane.
Public method OnToolBarAdded Called when a toolbar is added to the tool window.
Public method OnToolWindowCreated This method can be overridden by the derived class to execute any code that must run after the creation of IVsWindowFrame.
Protected method PreProcessMessage Preprocesses the messages from navigation keys. (Inherited from WindowPane.)
Public method ProvideSearchSettings Allows override of default search settings. By default, the search is started delayed, with indefinite progress. The names of properties that can be overridden are defined in the class SearchSettingsDataSource.PropertyNames. Values that implement the IVsUIObject interface can be constructed for common types using the BuiltInPropertyValue class, or you could use helper functions like SetValue to set values in the data source.
Public method SaveUIState Override to save custom state information to be used later when the pane is reconstructed. (Inherited from WindowPane.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IServiceProvider.GetService Gets the service of the specified type. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IOleCommandTarget.Exec Executes the specified command. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IOleCommandTarget.QueryStatus Gets the status of the commands. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsUIElementPane.CloseUIElementPane Closes the pane. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsUIElementPane.CreateUIElementPane Creates the pane. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsUIElementPane.GetDefaultUIElementSize When implemented in a derived class, gets the default size of the pane. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsUIElementPane.LoadUIElementState When implemented in a derived class, loads custom state storage. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsUIElementPane.SaveUIElementState Stores the state of the pane to the specified stream. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsUIElementPane.SetUIElementSite Sets the site for this window pane. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsUIElementPane.TranslateUIElementAccelerator Handles keyboard accelerators before the shell processes the message. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsWindowPane.ClosePane Obsolete. Closes the window pane. Obsolete. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsWindowPane.CreatePaneWindow Obsolete. Creates a window pane. Obsolete. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsWindowPane.GetDefaultSize Obsolete. Gets the default size of the window pane. Obsolete. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsWindowPane.LoadViewState Obsolete. Loads the saved view state. Obsolete. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsWindowPane.SaveViewState Obsolete. Saves the loaded view state. Obsolete. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsWindowPane.SetSite Obsolete. Initializes this window pane with the specified service provider. Obsolete. (Inherited from WindowPane.)
Explicit interface implemetationPrivate method IVsWindowPane.TranslateAccelerator Obsolete. Handles the translation of navigation keys. Obsolete (Inherited from WindowPane.)
Explicit interface implemetationPrivate property IVsWindowSearch.Category Gets the search category.

Top

Remarks

Derives from WindowPane and inherits the default services that WindowPane provides. Derived tool windows must offer a public constructor that takes a service provider. Visual Studio uses this constructor when it creates an instance of the tool window.

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.

See Also

Reference

Microsoft.VisualStudio.Shell Namespace