XamlUICommand.CanExecuteChanged Evento

Definizione

Si verifica ogni volta che si verifica un evento che influisce sul fatto che il comando possa essere eseguito.

// Register
event_token CanExecuteChanged(EventHandler<IInspectable> const& handler) const;

// Revoke with event_token
void CanExecuteChanged(event_token const* cookie) const;

// Revoke with event_revoker
XamlUICommand::CanExecuteChanged_revoker CanExecuteChanged(auto_revoke_t, EventHandler<IInspectable> const& handler) const;
// This member is not implemented in C#
function onCanExecuteChanged(eventArgs) { /* Your code */ }
xamlUICommand.addEventListener("canexecutechanged", onCanExecuteChanged);
xamlUICommand.removeEventListener("canexecutechanged", onCanExecuteChanged);
- or -
xamlUICommand.oncanexecutechanged = onCanExecuteChanged;
' This member is not implemented in VB.NET

Tipo evento

Implementazioni

E:Windows.UI.Xaml.Input.ICommand.CanExecuteChanged E:System.Windows.Input.ICommand.CanExecuteChanged

Commenti

Chiamare CanExecute sull'elemento di comando quando si verifica questo evento.

Un elemento di comando si disabilita in genere se il comando a cui è associato non può essere eseguito. Ad esempio, un oggetto MenuItem associato al comando Incolla è disabilitato quando non è presente alcun elemento negli Appunti da incollare.

Si applica a

Vedi anche