Partager via


OleMenuCommand.DynamicItemMatch Method

Allows a dynamic item command to match the subsequent items in its list.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'Déclaration
Public Overridable Function DynamicItemMatch ( _
    cmdId As Integer _
) As Boolean
'Utilisation
Dim instance As OleMenuCommand
Dim cmdId As Integer
Dim returnValue As Boolean

returnValue = instance.DynamicItemMatch(cmdId)
public virtual bool DynamicItemMatch(
    int cmdId
)
public:
virtual bool DynamicItemMatch(
    int cmdId
)
abstract DynamicItemMatch : 
        cmdId:int -> bool 
override DynamicItemMatch : 
        cmdId:int -> bool 
public function DynamicItemMatch(
    cmdId : int
) : boolean

Parameters

Return Value

Type: System.Boolean
true if the dynamic item found a match, otherwise false.

Implements

IOleMenuCommand.DynamicItemMatch(Int32)

Remarks

This method must be overridden when implementing a menu. For more information, see How to: Dynamically Add Menu Items.

.NET Framework Security

See Also

Reference

OleMenuCommand Class

OleMenuCommand Members

Microsoft.VisualStudio.Shell Namespace