protected OnCanExecute ( object sender, System.Windows.Input.CanExecuteRoutedEventArgs e ) : void | ||
sender | object | The command target on which the command is executing. |
e | System.Windows.Input.CanExecuteRoutedEventArgs | The event data. |
Результат | void |
protected internal override void OnCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
var target = GetDataContext(sender);
bool canExecute;
if (!CommandExecutionManager.TryExecuteCommand(target, e.Parameter, false, Executed,
CanExecute, out canExecute))
{
return;
}
e.CanExecute = canExecute;
e.Handled = true;
}