ContextMenuItem 建構函式

適用於版本2

初始化 ContextMenuItem 類別的新執行個體。

命名空間:  Microsoft.WebMatrix.Extensibility
組件:  Microsoft.WebMatrix.Extensibility (在 Microsoft.WebMatrix.Extensibility.dll 中)

語法

'宣告
Public Sub New ( _
    label As String, _
    icon As ImageSource, _
    command As ICommand, _
    commandParameter As Object _
)
'用途
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
)

參數

請參閱

參考

ContextMenuItem 類別

Microsoft.WebMatrix.Extensibility 命名空間