ModelingWindowPane.GetService Method
Gets the service of the specified type. Override this method to return the custom menu command service
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.Shell.11.0.dll)
Syntax
'Declaration
Protected Overrides Function GetService ( _
serviceType As Type _
) As Object
protected override Object GetService(
Type serviceType
)
protected:
virtual Object^ GetService(
Type^ serviceType
) override
abstract GetService :
serviceType:Type -> Object
override GetService :
serviceType:Type -> Object
protected override function GetService(
serviceType : Type
) : Object
Parameters
serviceType
Type: TypeThe type of menu command service to obtain.
Return Value
Type: Object
The service of the specified type. By default, this method returns the following services:IOleCommandTarget, IMenuCommandService, IObjectWithSite, IVsTrackSelectionEx, and IVsWindowFrame. If the type specified is ISelectionService, it returns this window pane. If the type is IVsTrackSelectionEx or IVsWindowFrame, it delegates to the local service provider.
Remarks
For more information about services, see Service Essentials.The following table contains an overview of the menu command services that this method supports.
Menu Command Service |
Description |
---|---|
This interface enables objects and their containers to dispatch commands to one another. For example, an object's toolbars might contain buttons for commands such as Print, Print Preview, Save, New, and Zoom. |
|
This interface provides methods to manage the menu commands that are available in design mode and to show some types of shortcut menus. |
|
This interface enables element selection. |
|
This interface provides simple objects with a lightweight (lighter than IOleObject) sitting mechanism. |
|
This interface tracks changes in selection. |
|
This interface provides access to the shell window frames. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.