ContextMenuItem Constructor
Lo siguiente se aplica a v2.
Inicializa una nueva instancia de la clase ContextMenuItem.
Espacio de nombres: Microsoft.WebMatrix.Extensibility
Ensamblado: Microsoft.WebMatrix.Extensibility (en Microsoft.WebMatrix.Extensibility.dll)
Sintaxis
'Declaración
Public Sub New ( _
label As String, _
icon As ImageSource, _
command As ICommand, _
commandParameter As Object _
)
'Uso
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
)
Parámetros
label
Tipo: System.StringEtiqueta del elemento.
icon
Tipo: System.Windows.Media.ImageSourceImagen 16x16 del elemento.
command
Tipo: System.Windows.Input.ICommandComando que se debe invocar cuando se selecciona el elemento.
commandParameter
Tipo: System.ObjectParámetro del comando.