Button.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

属性值

注解

此属性用于将命令与按钮的实例相关联。 此属性最常在 MVVM 模式中设置,以将回调绑定回 ViewModel。 IsEnabledCanExecute(Object) if set 控制。

适用于