ICommandSource.CommandTarget Propriété
Définition
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.
Objet sur lequel la commande est exécutée.
public:
property System::Windows::IInputElement ^ CommandTarget { System::Windows::IInputElement ^ get(); };
public System.Windows.IInputElement CommandTarget { get; }
member this.CommandTarget : System.Windows.IInputElement
Public ReadOnly Property CommandTarget As IInputElement
Valeur de propriété
Objet sur lequel la commande est exécutée.
Remarques
Dans le système de commandes Windows Presentation Foundation, la CommandTarget propriété sur un ICommandSource n’est applicable que lorsque l’objet ICommand est un RoutedCommand. Si le CommandTarget paramètre est défini sur un ICommandSource et que la commande correspondante n’est pas un RoutedCommand, la cible de commande est ignorée.
Lorsqu’elle est utilisée avec un RoutedCommand, la cible de commande est l’objet sur lequel les événements et CanExecute les Executed événements sont déclenchés. Si la CommandTarget propriété n’est pas définie, l’élément avec focus clavier est utilisé comme cible.