ContextMenuItem Constructor

Applies to v2.

Initializes a new instance of the ContextMenuItemclass.

Namespace:  Microsoft.WebMatrix.Extensibility
Assembly:  Microsoft.WebMatrix.Extensibility (in Microsoft.WebMatrix.Extensibility.dll)

Syntax

'Declaration
Public Sub New ( _
    label As String, _
    icon As ImageSource, _
    command As ICommand, _
    commandParameter As Object _
)
'Usage
Dim label As String 
Dim icon As ImageSource 
Dim command As ICommand 
Dim commandParameter As Object 

Dim instance As New ContextMenuItem(label, icon, _
    command, commandParameter)
public ContextMenuItem(
    string label,
    ImageSource icon,
    ICommand command,
    Object commandParameter
)
public:
ContextMenuItem(
    String^ label, 
    ImageSource^ icon, 
    ICommand^ command, 
    Object^ commandParameter
)
new : 
        label:string * 
        icon:ImageSource * 
        command:ICommand * 
        commandParameter:Object -> ContextMenuItem
public function ContextMenuItem(
    label : String, 
    icon : ImageSource, 
    command : ICommand, 
    commandParameter : Object
)

Parameters

  • commandParameter
    Type: System.Object

    Parameter for the command.

See Also

Reference

ContextMenuItem Class

Microsoft.WebMatrix.Extensibility Namespace