Breyta

Deila með


ButtonBase.Command Property

Definition

Gets or sets the command to invoke when this button is pressed.

public:
 property System::Windows::Input::ICommand ^ Command { System::Windows::Input::ICommand ^ get(); void set(System::Windows::Input::ICommand ^ value); };
[System.ComponentModel.Bindable(true)]
[System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)]
public System.Windows.Input.ICommand Command { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.Windows.Localizability(System.Windows.LocalizationCategory.NeverLocalize)>]
member this.Command : System.Windows.Input.ICommand with get, set
Public Property Command As ICommand

Property Value

A command to invoke when this button is pressed. The default value is null.

Attributes

Remarks

This property is used to associate a command with a particular button instance.

In Extensible Application Markup Language (XAML), this property is most often set to be a static command value from one of the existing command libraries, such as ApplicationCommands or NavigationCommands. For details, see Commanding Overview or ICommand.

XAML Attribute Usage

<object Command="commandName"/>  

XAML Values

commandName
The command to invoke when this button is pressed.

Dependency Property Information

Identifier field CommandProperty
Metadata properties set to true None

Applies to