XamlUICommand.CanExecuteChanged Event

Definition

Occurs whenever something happens that affects whether the command can execute.

// 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;
public event System.EventHandler<object> CanExecuteChanged;
function onCanExecuteChanged(eventArgs) { /* Your code */ }
xamlUICommand.addEventListener("canexecutechanged", onCanExecuteChanged);
xamlUICommand.removeEventListener("canexecutechanged", onCanExecuteChanged);
- or -
xamlUICommand.oncanexecutechanged = onCanExecuteChanged;
Public Custom Event CanExecuteChanged As EventHandler(Of Object) Implements CanExecuteChanged

Event Type

Implements

Remarks

Call CanExecute on the command element when this event occurs.

A command element typically disables itself if the command it is associated with cannot execute. For example, a MenuItem associated with the Paste command is disabled when the there is nothing on the clipboard to paste.

Applies to

See also