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
label
Type: System.StringLabel for the item.
icon
Type: System.Windows.Media.ImageSourceThe 16x16 image for the item.
command
Type: System.Windows.Input.ICommandCommand to invoke when the item is selected.
commandParameter
Type: System.ObjectParameter for the command.