Gets the menu command service that you want to implement.
Namespace: Microsoft.VisualStudio.Modeling.Shell
Assembly: Microsoft.VisualStudio.Modeling.Sdk.Shell (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll)
Syntax
'宣言
Protected Overrides Function GetService ( _
serviceType As Type _
) As Object
'使用
Dim serviceType As Type
Dim returnValue As Object
returnValue = Me.GetService(serviceType)
protected override Object GetService(
Type serviceType
)
protected:
virtual Object^ GetService(
Type^ serviceType
) override
protected override function GetService(
serviceType : Type
) : Object
Parameters
serviceType
Type: System.TypeThe type of menu command service to obtain. This method supports the following types:
Return Value
Type: System.Object
The menu command service that you want to implement.
Remarks
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 each other. 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 global designer verbs and menu commands that are available in design mode and to show some types of shortcut menus. |
|
This interface enables a designer to select components. |
|
This interface provides simple objects with a lightweight (lighter than IOleObject) sitting mechanism. |
|
This interface tracks changes in selection. |
|
This interface provides access to behavior and properties of environment window frames. |
Permissions
- 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.