/// <summary> /// Initializes a new instance of the WrappedZetboxCommand class. /// </summary> /// <param name="cmd">the command to wrap</param> public WrappedZetboxCommand(Zetbox.Client.Presentables.ICommandViewModel cmd) : base(cmd == null ? String.Empty : cmd.Label, typeof(WrappedZetboxCommand)) { if (cmd == null) { throw new ArgumentNullException("cmd", "No command to wrap"); } _command = cmd; _command.CanExecuteChanged += (sender, args) => CommandManager.InvalidateRequerySuggested(); }
/// <summary> /// Initializes a new instance of the WrappedZetboxCommand class. /// </summary> /// <param name="cmd">the command to wrap</param> public WrappedZetboxCommand(Zetbox.Client.Presentables.ICommandViewModel cmd) : base(cmd == null ? String.Empty : cmd.Label, typeof(WrappedZetboxCommand)) { if (cmd == null) { throw new ArgumentNullException("cmd", "No command to wrap"); } _command = cmd; _command.CanExecuteChanged += (sender, args) => CommandManager.InvalidateRequerySuggested(); }