public void RaiseCommand() { if (!string.IsNullOrEmpty(Command)) { ICommandContainer container = Container as ICommandContainer; if (container != null) { CommandEventArgs e = new CommandEventArgs(Command, this, null); container.RaiseCommand(e); } } }
public virtual void RaiseCommand(CommandEventArgs e) { if (Command != null) { Command(this, e); } if (!e.Handled) { ICommandContainer container = this.Container as ICommandContainer; if (container != null) { container.RaiseCommand(e); } } }