using PDF_Office.EventAggregators; using Prism.Commands; using Prism.Events; using Prism.Mvvm; using System; using System.Collections.Generic; using System.Linq; namespace PDF_Office.ViewModels.EditTools.Background { public class BackgroundContentViewModel : BindableBase { public IEventAggregator eventAggregator; public DelegateCommand CloseEditToolCommand { get; set; } public BackgroundContentViewModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; CloseEditToolCommand = new DelegateCommand(CloseEditTool); } public void CloseEditTool() { this.eventAggregator.GetEvent().Publish(); } } }