ButtonBase.Command Propriété
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit la commande à appeler lorsque ce bouton est activé.
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
Commande à appeler lorsque l'utilisateur clique sur ce bouton. La valeur par défaut est null
.
- Attributs
Cette propriété est utilisée pour associer une commande à une instance de bouton particulière.
En XAML (Extensible Application Markup Language), cette propriété est la plus souvent définie comme une valeur de commande statique à partir de l’une des bibliothèques de commandes existantes, telles que ApplicationCommands ou NavigationCommands. Pour plus d’informations, consultez Vue d’ensemble des commandes ou ICommand.
<object Command="commandName"/>
Commandname
Commande à appeler lorsque ce bouton est enfoncé.
Champ d’identificateur | CommandProperty |
Propriétés de métadonnées définies sur true |
Aucun |
Produit | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 |
Windows Desktop | 3.0, 3.1, 5, 6, 7 |