語言

ImageButton.Command 屬性

定義

當點擊圖片按鈕時,會接收或設定呼叫指令。 這是可綁定屬性。

public:
 property System::Windows::Input::ICommand ^ Command { System::Windows::Input::ICommand ^ get(); void set(System::Windows::Input::ICommand ^ value); };
public System.Windows.Input.ICommand Command { get; set; }
member this.Command : System.Windows.Input.ICommand with get, set
Public Property Command As ICommand

屬性值

ICommand按下按鈕時執行。 預設值為 null。

備註

此特性通常用於 MVVM 模式,將按鈕綁定到視圖模型中的指令。 按鈕的 IsEnabled 屬性由 CanExecute(Object)控制。

適用於