Lingua

MenuFlyoutItem.Command Proprietà

Definizione

Ottiene o imposta il comando da richiamare quando viene premuto l'elemento.

public:
 property ICommand ^ Command { ICommand ^ get(); void set(ICommand ^ value); };
ICommand Command();

void Command(ICommand value);
public ICommand Command { get; set; }
var iCommand = menuFlyoutItem.command;
menuFlyoutItem.command = iCommand;
Public Property Command As ICommand
<MenuFlyoutItem Command="commandReference"/>

Valore della proprietà

Comando da richiamare quando viene premuto l'elemento. Il valore predefinito è Null.

Commenti

L'interfaccia ICommand proviene da un'origine diversa a seconda che l'origine dati sia implementata in C++ o per Microsoft .NET. C++ implementa Microsoft. UI. Xaml.Input.ICommand. Microsoft .NET implementa System.Windows. Input.ICommand. Entrambe le interfacce hanno lo stesso modello. L'interfaccia che chiami dal codice dell'app è analoga: usare Microsoft. UI. Codice Xaml.Input.ICommand per C++ e System.Windows. Input.ICommand per Microsoft .NET codice.

Sintassi XAML illustrata per Microsoft .NET System.Windows. Il tipo Input.ICommand non funziona per Windows Runtime XAML. È consigliabile usare sempre un riferimento binding. I costrutti, ad esempio i comandi denominati e x:Static , non sono supportati.

Si applica a