ToolWindowPane ToolWindowPane ToolWindowPane ToolWindowPane ToolWindowPane Class

Definition

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

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
type ToolWindowPane = class
    inherit WindowPane
    interface IVsWindowSearch
Public Class ToolWindowPane
Inherits WindowPane
Implements IVsWindowSearch
Inheritance
ToolWindowPaneToolWindowPaneToolWindowPaneToolWindowPaneToolWindowPane
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() ToolWindowPane() ToolWindowPane() ToolWindowPane() ToolWindowPane()

Initializes a new instance of ToolWindowPane with a null service provider

ToolWindowPane(IServiceProvider) ToolWindowPane(IServiceProvider) ToolWindowPane(IServiceProvider) ToolWindowPane(IServiceProvider) ToolWindowPane(IServiceProvider)

Initializes an instance of this class.

Properties

BitmapImageMoniker BitmapImageMoniker BitmapImageMoniker BitmapImageMoniker BitmapImageMoniker

Gets or sets 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 BitmapIndex BitmapIndex BitmapIndex BitmapIndex

Gets or sets the index of the image in the bitmap strip to use for the window frame icon.

BitmapResourceID BitmapResourceID BitmapResourceID BitmapResourceID BitmapResourceID

Gets or sets the resource ID for the bitmap strip from which to take the window frame icon.

Caption Caption Caption Caption Caption

Gets or sets the caption for the tool window.

Content Content Content Content Content

Gets or sets the content of this tool window.

(Inherited from WindowPane)
Frame Frame Frame Frame Frame

Gets or sets the IVsWindowFrame that hosts the ToolWindowPane.

InitializationMode InitializationMode InitializationMode InitializationMode InitializationMode

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

(Inherited from WindowPane)
Package Package Package Package Package

Gets or sets the package that owns the tool window.

SearchCategory SearchCategory SearchCategory SearchCategory 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.

SearchEnabled SearchEnabled SearchEnabled SearchEnabled 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.

SearchFiltersEnum SearchFiltersEnum SearchFiltersEnum SearchFiltersEnum 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.

SearchHost SearchHost SearchHost SearchHost SearchHost

Gets the search host implementation associated with this tool window.

SearchOptionsEnum SearchOptionsEnum SearchOptionsEnum SearchOptionsEnum 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.

ToolBar ToolBar ToolBar ToolBar ToolBar

Gets or sets the CommandID.

ToolBarCommandTarget ToolBarCommandTarget ToolBarCommandTarget ToolBarCommandTarget 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.

ToolBarDropTarget ToolBarDropTarget ToolBarDropTarget ToolBarDropTarget ToolBarDropTarget

Gets or sets the toolbar drop target.

ToolBarLocation ToolBarLocation ToolBarLocation ToolBarLocation ToolBarLocation

Gets or sets the location of the toolbar in the tool window.

ToolClsid ToolClsid ToolClsid ToolClsid ToolClsid

Gets or sets the CLSID of a tool that should be used for this tool window.

Window Window Window Window Window

Gets the window associated with this window pane.

(Inherited from WindowPane)

Methods

AddInfoBar(IVsInfoBar) AddInfoBar(IVsInfoBar) AddInfoBar(IVsInfoBar) AddInfoBar(IVsInfoBar) 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) AddInfoBar(IVsUIElement) AddInfoBar(IVsUIElement) AddInfoBar(IVsUIElement) 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() ClearSearch() ClearSearch() ClearSearch() ClearSearch()

Clears the pane of the results from a previously completed or partial search.

CreateSearch(UInt32, IVsSearchQuery, IVsSearchCallback) CreateSearch(UInt32, IVsSearchQuery, IVsSearchCallback) CreateSearch(UInt32, IVsSearchQuery, IVsSearchCallback) CreateSearch(UInt32, IVsSearchQuery, IVsSearchCallback) CreateSearch(UInt32, IVsSearchQuery, IVsSearchCallback)

Override at least this function if you need to support search in a tool window.

Dispose() Dispose() Dispose() Dispose() Dispose()

Disposes the window pane and its resources.

(Inherited from WindowPane)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Disposes the resources of the window pane.

(Inherited from WindowPane)
GetIVsWindowPane() GetIVsWindowPane() GetIVsWindowPane() GetIVsWindowPane() GetIVsWindowPane()

Gets the IVsWindowPane that is associated with the tool window.

GetService(Type) GetService(Type) GetService(Type) GetService(Type) GetService(Type)

Gets the service of the specified type.

(Inherited from WindowPane)
Initialize() Initialize() Initialize() Initialize() Initialize()

Initializes services after the window pane has been sited.

(Inherited from WindowPane)
LoadUIState(Stream) LoadUIState(Stream) LoadUIState(Stream) LoadUIState(Stream) LoadUIState(Stream)

Override to load the previously saved state of the pane.

(Inherited from WindowPane)
OnClose() OnClose() OnClose() OnClose() OnClose()

Raised when the window is closed.

(Inherited from WindowPane)
OnCreate() OnCreate() OnCreate() OnCreate() OnCreate()

Raised when the window pane is created.

(Inherited from WindowPane)
OnInfoBarActionItemClicked(IVsInfoBarUIElement, IVsInfoBar, IVsInfoBarActionItem) OnInfoBarActionItemClicked(IVsInfoBarUIElement, IVsInfoBar, IVsInfoBarActionItem) OnInfoBarActionItemClicked(IVsInfoBarUIElement, IVsInfoBar, IVsInfoBarActionItem) OnInfoBarActionItemClicked(IVsInfoBarUIElement, IVsInfoBar, IVsInfoBarActionItem) 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) OnInfoBarClosed(IVsInfoBarUIElement, IVsInfoBar) OnInfoBarClosed(IVsInfoBarUIElement, IVsInfoBar) OnInfoBarClosed(IVsInfoBarUIElement, IVsInfoBar) 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) OnNavigationKeyDown(UInt32, UInt32) OnNavigationKeyDown(UInt32, UInt32) OnNavigationKeyDown(UInt32, UInt32) OnNavigationKeyDown(UInt32, UInt32)

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.

OnToolBarAdded() OnToolBarAdded() OnToolBarAdded() OnToolBarAdded() OnToolBarAdded()

Called when a toolbar is added to the tool window.

OnToolWindowCreated() OnToolWindowCreated() OnToolWindowCreated() OnToolWindowCreated() OnToolWindowCreated()

This method can be overridden by the derived class to execute any code that must run after the creation of IVsWindowFrame.

PreProcessMessage(Message) PreProcessMessage(Message) PreProcessMessage(Message) PreProcessMessage(Message) PreProcessMessage(Message)

Preprocesses the messages from navigation keys.

(Inherited from WindowPane)
ProvideSearchSettings(IVsUIDataSource) ProvideSearchSettings(IVsUIDataSource) ProvideSearchSettings(IVsUIDataSource) ProvideSearchSettings(IVsUIDataSource) ProvideSearchSettings(IVsUIDataSource)

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 Microsoft.Internal.VisualStudio.PlatformUI.BuiltInPropertyValue class, or you 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) RemoveInfoBar(IVsInfoBar) RemoveInfoBar(IVsInfoBar) RemoveInfoBar(IVsInfoBar) RemoveInfoBar(IVsInfoBar)

Removes an info bar from this ToolWindowPane.

RemoveInfoBar(IVsUIElement) RemoveInfoBar(IVsUIElement) RemoveInfoBar(IVsUIElement) RemoveInfoBar(IVsUIElement) RemoveInfoBar(IVsUIElement)

Removes an info bar from this ToolWindowPane.

SaveUIState(Stream) SaveUIState(Stream) SaveUIState(Stream) SaveUIState(Stream) SaveUIState(Stream)

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

(Inherited from WindowPane)

Events

InfoBarActionItemClicked InfoBarActionItemClicked InfoBarActionItemClicked InfoBarActionItemClicked InfoBarActionItemClicked

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

InfoBarClosed InfoBarClosed InfoBarClosed InfoBarClosed InfoBarClosed

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

Explicit Interface Implementations

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

Executes the specified command.

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

Gets the status of the commands.

(Inherited from WindowPane)
IServiceProvider.GetService(Type) IServiceProvider.GetService(Type) IServiceProvider.GetService(Type) IServiceProvider.GetService(Type) IServiceProvider.GetService(Type)

Gets the service of the specified type.

(Inherited from WindowPane)
IVsUIElementPane.CloseUIElementPane() IVsUIElementPane.CloseUIElementPane() IVsUIElementPane.CloseUIElementPane() IVsUIElementPane.CloseUIElementPane() IVsUIElementPane.CloseUIElementPane()

Closes the pane.

(Inherited from WindowPane)
IVsUIElementPane.CreateUIElementPane(Object) IVsUIElementPane.CreateUIElementPane(Object) IVsUIElementPane.CreateUIElementPane(Object) IVsUIElementPane.CreateUIElementPane(Object) IVsUIElementPane.CreateUIElementPane(Object)

Creates the pane.

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

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

(Inherited from WindowPane)
IVsUIElementPane.LoadUIElementState(IStream) IVsUIElementPane.LoadUIElementState(IStream) IVsUIElementPane.LoadUIElementState(IStream) IVsUIElementPane.LoadUIElementState(IStream) IVsUIElementPane.LoadUIElementState(IStream)

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

(Inherited from WindowPane)
IVsUIElementPane.SaveUIElementState(IStream) IVsUIElementPane.SaveUIElementState(IStream) IVsUIElementPane.SaveUIElementState(IStream) IVsUIElementPane.SaveUIElementState(IStream) IVsUIElementPane.SaveUIElementState(IStream)

Stores the state of the pane to the specified stream.

(Inherited from WindowPane)
IVsUIElementPane.SetUIElementSite(IServiceProvider) IVsUIElementPane.SetUIElementSite(IServiceProvider) IVsUIElementPane.SetUIElementSite(IServiceProvider) IVsUIElementPane.SetUIElementSite(IServiceProvider) IVsUIElementPane.SetUIElementSite(IServiceProvider)

Sets the site for this window pane.

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

Handles keyboard accelerators before the shell processes the message.

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

Closes the window pane. Obsolete.

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

Creates a window pane. Obsolete.

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

Gets the default size of the window pane. Obsolete.

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

Loads the saved view state. Obsolete.

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

Saves the loaded view state. Obsolete.

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

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

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

Handles the translation of navigation keys. Obsolete

(Inherited from WindowPane)
IVsWindowSearch.Category IVsWindowSearch.Category IVsWindowSearch.Category IVsWindowSearch.Category IVsWindowSearch.Category

Extension Methods

FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestor<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestor<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>) FindAncestorOrSelf<TElementType>(TElementType, Func<TElementType,TElementType>, Func<TElementType,Boolean>)
FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>) FindAncestorOrSelf<TAncestorType,TElementType>(TElementType, Func<TElementType,TElementType>)
IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>) IsAncestorOf<TElementType>(TElementType, TElementType, Func<TElementType,TElementType>)

Microsoft internal use only.

Applies to