public void Execute(object parameter) { if (Action != null) { Action(); } if (Click != null) { Click(this, EventArgs.Empty); } if (InternalCommand != null && InternalCommand.CanExecute(parameter)) { InternalCommand.Execute(parameter); } }
private void InternalExecuteCommand() { if (Command != null) { if (Command.CanExecute(CommandParameter)) { Command.Execute(CommandParameter); InternalCommand?.Execute(null); } } else { InternalCommand?.Execute(null); } }