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); }
public RibbonTabViewModelFactory(IEventAggregator eventAggregator, IAddGoalEventArgsFactory addGoalEventArgsFactory) { this.eventAggregator = eventAggregator; this.addGoalEventArgsFactory = addGoalEventArgsFactory; }