Share via


CommandContextBoundMenuCommand Class

Represents a menu command that is bound to a specific UI context.

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll)

Syntax

'Declaration
Public Class CommandContextBoundMenuCommand _
    Inherits OleMenuCommand
'Usage
Dim instance As CommandContextBoundMenuCommand
public class CommandContextBoundMenuCommand : OleMenuCommand
public ref class CommandContextBoundMenuCommand : public OleMenuCommand
public class CommandContextBoundMenuCommand extends OleMenuCommand

Remarks

The command is visible only when its UI context is active.

You should use the command with entries in the VISIBILITY_SECTION of the Commands.vstc file. In the Domain-Specific Language Designer, you can find the Commands.vstc file under the DslPackage node.

Inheritance Hierarchy

System.Object
  System.ComponentModel.Design.MenuCommand
    Microsoft.VisualStudio.Shell.OleMenuCommand
      Microsoft.VisualStudio.Modeling.Shell.CommandContextBoundMenuCommand

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

CommandContextBoundMenuCommand Members

Microsoft.VisualStudio.Modeling.Shell Namespace