Freigeben über


ToolWindowPane Class

Definition

Summary description for ToolWindowPane.

public ref class ToolWindowPane : Microsoft::VisualStudio::Shell::WindowPane, Microsoft::VisualStudio::Shell::Interop::IVsWindowSearch
[Windows::Foundation::Metadata::WebHostHidden]
class ToolWindowPane : Microsoft::VisualStudio::Shell::WindowPane, Microsoft::VisualStudio::Shell::Interop::IVsWindowSearch
[System.Runtime.InteropServices.ComVisible(true)]
public class ToolWindowPane : Microsoft.VisualStudio.Shell.WindowPane, Microsoft.VisualStudio.Shell.Interop.IVsWindowSearch
[<System.Runtime.InteropServices.ComVisible(true)>]
type ToolWindowPane = class
    inherit WindowPane
    interface IVsWindowSearch
Public Class ToolWindowPane
Inherits WindowPane
Implements IVsWindowSearch
Inheritance
ToolWindowPane
Attributes
Implements

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.

Constructors

ToolWindowPane()

Creates a new tool window pane with a null parent service provider

ToolWindowPane(IServiceProvider)

Constructor

Properties

BitmapImageMoniker

Get or Set the ImageMoniker for the icon for this tool window. This property should be used instead of BitmapResource and BitmapIndex to allow for DPI-aware icons.

BitmapIndex

Get or Set the index of the image to use in the bitmap strip for the window frame icon. BitmapImageMoniker should be used instead, as using BitmapIndex and BitmapResourceId results in an icon that is not DPI-aware.

BitmapResourceID

Get or Set the resource ID for the bitmap strip from which to take the window frame icon. BitmapImageMoniker should be used instead, as using BitmapIndex and BitmapResourceId results in an icon that is not DPI-aware.

Caption

Get or Set the text on the title bar of the ToolWindow

Content

Gets or sets the content of this tool window.

(Inherited from WindowPane)
Frame

Get or Set the Frame (IvsWindowFrame) hosting the ToolWindow

InitializationMode

Gets the initialization mode that is associated with this window pane.

(Inherited from WindowPane)
Package

Get or Set the Package (Microsoft.VisualStudio.Shell.Package) owning the ToolWindow. This should only be set by the base Package class when it creates the toolwindow.

ParentHandle (Inherited from WindowPane)
SearchCategory

The search category that's used for storing MRU items (should the window search implementation for your toolwindow support most-recently-used search strings) By default, the toolwindow guid is used for the search category.

SearchEnabled

Override this if you want to support search in your window. You will also need to override other functions from IVsWindowSearch interface, like CreateSearch, etc.

SearchFiltersEnum

Override this function if the toolwindow supports search filters The class WindowSearchFilterEnumerator can be used to construct an enumerator over an array of search filters implementing IVsWindowSearchFilter interface.

SearchHost

Gets the search host implementation associated with this tool window.

SearchOptionsEnum

Override this function if the toolwindow supports search options The class WindowSearchOptionEnumerator can be used to construct an enumerator over an array of search options implementing IVsWindowSearchOption interface.

ToolBar

If the toolwindow has a ToolBar, it is described by this parameter. Otherwise this is null

ToolBarCommandTarget

If the toolwindow has a ToolBar then this property allows to customize its command target. If this value is null then window frame of this toolwindow 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.

ToolBarDropTarget

If the toolwindow has a ToolBar, allows intercepting drag and drop operations on the toolbar. Otherwise this is null

ToolBarLocation

Get or Set where the toolbar should be in the tool window (Up, down, left, right). This parameter is based on VSTWT_LOCATION

ToolClsid

This is used to specify the CLSID of a tool that should be used for this toolwindow

Window

Gets the window associated with this window pane.

(Inherited from WindowPane)

Methods

AddInfoBar(IVsInfoBar)

Adds an info bar to this ToolWindowPane. The info bar will show at the top of the pane's frame when that frame is visible on screen.

AddInfoBar(IVsUIElement)

Adds an info bar to this ToolWindowPane. The info bar will show at the top of the pane's frame when that frame is visible on screen.

ClearSearch()

Clear the pane of results from a previously completed or partial search

CreateSearch(UInt32, IVsSearchQuery, IVsSearchCallback)

Override at least this function if you need to support search in a toolwindow

Dispose()

Disposes the window pane and its resources.

(Inherited from WindowPane)
Dispose(Boolean)

Disposes the resources of the window pane.

(Inherited from WindowPane)
GetIVsWindowPane()

This method makes it possible to provide an IVsWindowPane not derived from ToolWindowPane To support that scenario one would override this method and create their IVsWindowPane and return it.

GetService(Type)

Gets the service of the specified type.

(Inherited from WindowPane)
Initialize()

Initializes services after the window pane has been sited.

(Inherited from WindowPane)
LoadUIState(Stream)

Override to load previously saved state of the pane

(Inherited from WindowPane)
OnClose()

Raised when the window is closed.

(Inherited from WindowPane)
OnCreate()

Raised when the window pane is created.

(Inherited from WindowPane)
OnInfoBarActionItemClicked(IVsInfoBarUIElement, IVsInfoBar, IVsInfoBarActionItem)

Called when an action item on an info bar added via AddInfoBar is clicked. If this method is overridden, the base implementation must be called to raise the InfoBarActionItemClicked event.

OnInfoBarClosed(IVsInfoBarUIElement, IVsInfoBar)

Called when an info bar added via AddInfoBar is closed. If this method is overridden, the base implementation must be called to raise the InfoBarClosed event.

OnNavigationKeyDown(UInt32, UInt32)

Allows the pane to intercept certains keys (after a search is started), and navigate between the results or select one of the results displayed in the pane.

OnToolBarAdded()

This should be overriden if you want to run code before the window is shown but after its toolbar is added.

OnToolWindowCreated()

This method can be overriden by the derived class to execute any code that needs to run after the IVsWindowFrame is created. If the toolwindow has a toolbar with a combobox, it should make sure its command handler are set by the time they return from this method. This is called when someone set the Frame property.

PreProcessMessage(Message)

Preprocesses the messages from navigation keys.

(Inherited from WindowPane)
ProvideSearchSettings(IVsUIDataSource)

Allows override of default search settings. By default, the search is started delayed, with indefinite progress. The named of properties that can be overriden are defined in the class SearchSettingsDataSource.PropertyNames. Values implementing IVsUIObject interface can be constructed for common types using Microsoft.Internal.VisualStudio.PlatformUI.BuiltInPropertyValue class, or one could use helper functions like Microsoft.Internal.VisualStudio.PlatformUI.Utilities.SetValue(Microsoft.VisualStudio.Shell.Interop.IVsUIDataSource,System.String,System.Object) to set values in the data source.

RemoveInfoBar(IVsInfoBar)

Removes an info bar from this ToolWindowPane.

RemoveInfoBar(IVsUIElement)

Removes and info bar from this ToolWindowPane.

SaveUIState(Stream)

Override to save custom state information to be used later when the pane is reconstructed.

(Inherited from WindowPane)

Events

InfoBarActionItemClicked

Event raised when a button or hyperlink on an info bar associated with this ToolWindowPane is clicked.

InfoBarClosed

Event raised when an info bar associated with this ToolWindowPane is closed.

Explicit Interface Implementations

IOleCommandTarget.Exec(Guid, UInt32, UInt32, IntPtr, IntPtr)

Executes the specified command.

(Inherited from WindowPane)
IOleCommandTarget.QueryStatus(Guid, UInt32, OLECMD[], IntPtr)

Gets the status of the commands.

(Inherited from WindowPane)
IServiceProvider.GetService(Type)

Gets the service of the specified type.

(Inherited from WindowPane)
IVsUIElementPane.CloseUIElementPane()

Closes the pane.

(Inherited from WindowPane)
IVsUIElementPane.CreateUIElementPane(Object)

Creates the pane.

(Inherited from WindowPane)
IVsUIElementPane.GetDefaultUIElementSize(SIZE[])

When implemented in a derived class, gets the default size of the pane.

(Inherited from WindowPane)
IVsUIElementPane.LoadUIElementState(IStream)

When implemented in a derived class, loads custom state storage.

(Inherited from WindowPane)
IVsUIElementPane.SaveUIElementState(IStream)

Stores the state of the pane to the specified stream.

(Inherited from WindowPane)
IVsUIElementPane.SetUIElementSite(IServiceProvider)

Sets the site for this window pane.

(Inherited from WindowPane)
IVsUIElementPane.TranslateUIElementAccelerator(MSG[])

Handles keyboard accelerators before the shell processes the message.

(Inherited from WindowPane)
IVsWindowPane.ClosePane()
Obsolete.

Closes the window pane. Obsolete.

(Inherited from WindowPane)
IVsWindowPane.CreatePaneWindow(IntPtr, Int32, Int32, Int32, Int32, IntPtr)
Obsolete.

Creates a window pane. Obsolete.

(Inherited from WindowPane)
IVsWindowPane.GetDefaultSize(SIZE[])
Obsolete.

Gets the default size of the window pane. Obsolete.

(Inherited from WindowPane)
IVsWindowPane.LoadViewState(IStream)
Obsolete.

Loads the saved view state. Obsolete.

(Inherited from WindowPane)
IVsWindowPane.SaveViewState(IStream)
Obsolete.

Saves the loaded view state. Obsolete.

(Inherited from WindowPane)
IVsWindowPane.SetSite(IServiceProvider)
Obsolete.

Initializes this window pane with the specified service provider. Obsolete.

(Inherited from WindowPane)
IVsWindowPane.TranslateAccelerator(MSG[])
Obsolete.

Handles the translation of navigation keys. Obsolete

(Inherited from WindowPane)
IVsWindowSearch.Category

Return the search category.

Applies to