public RibbonTabViewModel(IEventAggregator eventAggregator, IGoalCollection goalCollection, IAddGoalEventArgsFactory addGoalEventArgsFactory) { this.GoalCollection = goalCollection; AddCommand = new DelegateCommand( () => eventAggregator.GetEvent<AddGoalEvent>() .Publish(addGoalEventArgsFactory.Create(GoalCollection)), () => true); CloseCommand = new DelegateCommand( () => eventAggregator.GetEvent<CloseGoalCollectionEvent>() .Publish(GoalCollection), () => true); }