BackgroundContentViewModel.cs 763 B

12345678910111213141516171819202122232425262728
  1. using PDF_Office.EventAggregators;
  2. using Prism.Commands;
  3. using Prism.Events;
  4. using Prism.Mvvm;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. namespace PDF_Office.ViewModels.EditTools.Background
  9. {
  10. public class BackgroundContentViewModel : BindableBase
  11. {
  12. public IEventAggregator eventAggregator;
  13. public DelegateCommand CloseEditToolCommand { get; set; }
  14. public BackgroundContentViewModel(IEventAggregator eventAggregator)
  15. {
  16. this.eventAggregator = eventAggregator;
  17. CloseEditToolCommand = new DelegateCommand(CloseEditTool);
  18. }
  19. public void CloseEditTool()
  20. {
  21. this.eventAggregator.GetEvent<CloseEditToolEvent>().Publish();
  22. }
  23. }
  24. }