次の方法で共有


ToolWindow Class

Definition

Important

This API is not CLS-compliant.

Provides a base class for tool windows.

public ref class ToolWindow abstract : Microsoft::VisualStudio::Modeling::Shell::ModelingWindowPane
[System.CLSCompliant(false)]
public abstract class ToolWindow : Microsoft.VisualStudio.Modeling.Shell.ModelingWindowPane
public abstract class ToolWindow : Microsoft.VisualStudio.Modeling.Shell.ModelingWindowPane
[<System.CLSCompliant(false)>]
type ToolWindow = class
    inherit ModelingWindowPane
type ToolWindow = class
    inherit ModelingWindowPane
Public MustInherit Class ToolWindow
Inherits ModelingWindowPane
Inheritance
Derived
Attributes

Constructors

ToolWindow(IServiceProvider)

Construct a tool window.

Properties

ActiveInPlaceEditWindow

May be set to provide an active in-place edit window Clipboard commands will be routed to this window.

(Inherited from ModelingWindowPane)
BitmapIndex

Overriden in derived classes to specify the index of the bitmap to display next to the tool window name in tabbed mode. This must be an index into the image resource specified by the BitmapResource property.

BitmapResource

Overriden in derived classes to specify the resource id of the bitmap to display next to the tool window name in tabbed mode. This must be an index into the unmanaged satellite dll corresponding to this package. If -1 is returned, the toolwindow is considered to not have a Bitmap. b409435

Content

Gets or sets the content of this tool window.

(Inherited from WindowPane)
DocData

Gets the currently focused document data. This will be null if this is not an instance of our DocData object.

EnableUndo

Used by derived classes to turn on/off handling of undo commands.

Frame

Provides access to the IVsWindowFrame corresponding to this window. In most cases, direct access to this interface is not necessary

(Inherited from ModelingWindowPane)
HasSelectableObjects

Overridden here to return false when the document we are tracking is closed.

HasToolBar

Overriden in derived classes that want to host a toolbar. Placement and toolbar to display should be set in the derived class via the ToolbarHost.

HelpService

Help context managed by this window. Keywords and attributes placed in this context will have priority HelpContextType.Window.

(Inherited from ModelingWindowPane)
InitializationMode

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

(Inherited from WindowPane)
MenuService

Gets the IMenuCommandService which derived classes and hosted controls can use to add commands.

(Inherited from ModelingWindowPane)
ParentHandle (Inherited from WindowPane)
PrimarySelection

Returns the current primary selection. If one hasn't been set, returns the first object in the collection

(Inherited from ModelingWindowPane)
SelectedElements

Stores the elements currently selected in this window.

(Inherited from ModelingWindowPane)
SelectionCount

A count of the currently selected objects.

(Inherited from ModelingWindowPane)
SelectionHelpService

Help context managed by this window. Help keywords and attributes placed in this context have priority HelpContextType.Selection for document windows and HelpContextType.ToolWindowSelection for tool windows. The context is cleared on each selection change, so derived class that use this context should override OnSelectionChanged to keep it up-to-date.

(Inherited from ModelingWindowPane)
ServiceProvider

Gets the service provider local to this window frame

(Inherited from ModelingWindowPane)
ToolBarHost

Provides derived classes access to the shell implementation of IVsToolWindowToolbarHost, used to manage toolbars in the the tool window.

ToolWindowFont

Returns the font used by the VS shell for dialog boxes and tool windows.

Window

Gets the window associated with this window pane.

(Inherited from WindowPane)
WindowTitle

Overriden in derived classes to specify title for the tool window.

Methods

CommitPendingEditForCommand(CommandID)

Gives derived classes a chance to commit outstanding edits before a command is executed. This is called frequently, so only lightweight processing should be done here. This is preferable to IVsWindowPaneCommit.CommitPendingEdit, because it allows derived classes to make the decision to commit for some commands but not others.

(Inherited from ModelingWindowPane)
CountAllObjects()

mplementation of ISelectionContainer interface.

(Inherited from ModelingWindowPane)
CountObjects(UInt32, UInt32)

Implementation of ISelectionContainer interface.

(Inherited from ModelingWindowPane)
CountSelectedObjects()

Implementation of ISelectionContainer interface.

(Inherited from ModelingWindowPane)
Dispose()

Disposes the window pane and its resources.

(Inherited from WindowPane)
Dispose(Boolean)

Dispose of resources.

DoSelectObjects(UInt32, Object[], UInt32)

Derived classes should override to support selection via ISelectionContainer.SelectObjects. For instance, The drop-down above the VS property browser uses this mechanism, as does automation.

(Inherited from ModelingWindowPane)
GetAllObjects(UInt32, Object[])

ISelectionContainer.GetObjects (All).

(Inherited from ModelingWindowPane)
GetComponentSelected(Object)

Returns true iff obj is currently selected.

(Inherited from ModelingWindowPane)
GetContainerSelected(Object)

Implementation identical to GetComponentSelected.

(Inherited from ModelingWindowPane)
GetObjects(UInt32, UInt32, Object[])

Implementation of ISelectionContainer interface.

(Inherited from ModelingWindowPane)
GetSelectedComponents()

Returns a read-only collection of currently selected components.

(Inherited from ModelingWindowPane)
GetSelectedObjects(UInt32, Object[])

ISelectionContainer.GetObjects (Selected).

(Inherited from ModelingWindowPane)
GetService(Type)

Override to return our menu command service implementation.

(Inherited from ModelingWindowPane)
GetSite(Guid, IntPtr)

Implementation of IObjectWithSite.

(Inherited from ModelingWindowPane)
Hide()

Hides this window.

(Inherited from ModelingWindowPane)
Initialize()

Perform initializaton. ToolWindow base class set frame properties here.

LoadUIState(Stream)

Override to load previously saved state of the pane

(Inherited from WindowPane)
OnAfterToolWindowCreate()

Post-creation initialization.

OnClose()

Called when window is closed. Overridden here to remove our objects from the selection context so that the property browser doesn't call back on our objects after the window is closed.

(Inherited from ModelingWindowPane)
OnCreate()

Called when the ToolWindow is created.

OnDocumentWindowChanged(ModelingDocView, ModelingDocView)

Derived classes can override this to receive notification when the document window changes in the shell. The new view is stored in the CurrentView property.

OnSelectionChanged(EventArgs)

Called when the selection changes. Derived classes that override this method should make sure to call the base class so event listeners are notified.

(Inherited from ModelingWindowPane)
OnSelectionChanging(EventArgs)

Called prior to a selection change. Derived classes that override this method should make sure to call the base class so event listeners are notified.

(Inherited from ModelingWindowPane)
OnToolWindowCreate()

Called when the ToolWindow is created.

PreProcessMessage(Message)

Allows us to handle window messages.

(Inherited from ModelingWindowPane)
SaveUIState(Stream)

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

(Inherited from WindowPane)
SelectObjects(UInt32, Object[], UInt32)

Implementation of ISelectionContainer interface.

(Inherited from ModelingWindowPane)
SetSelectedComponents(ICollection, SelectionTypes)

Not used. Implemenation of ISelectionService interface.

(Inherited from ModelingWindowPane)
SetSelectedComponents(ICollection)

Pushes components into the selection container (replaces currently selected components), and notifies the shell of a selection change.

(Inherited from ModelingWindowPane)
SetSite(Object)

Implementation of IObjectWithSite.

(Inherited from ModelingWindowPane)
Show()

Shows this window.

(Inherited from ModelingWindowPane)
ShowNoActivate()

Shows this window without activating it.

(Inherited from ModelingWindowPane)

Events

SelectionChanged

This event gets fired after a selection change in this window. Clients that want notification of selection changes to this window should register an event handler.

(Inherited from ModelingWindowPane)
SelectionChanging

This event gets fired just prior to a selection change in this window. Clients that want notification of selection changes to this window should register an event handler.

(Inherited from ModelingWindowPane)

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)

Applies to