using ComPDFKitViewer.PdfViewer; using PDF_Office.EventAggregators; using PDF_Office.Model; using PDF_Office.Model.EditTools.Background; using Prism.Commands; using Prism.Events; using Prism.Mvvm; using Prism.Regions; using System; using System.Collections.Generic; using System.Linq; using System.Windows; namespace PDF_Office.ViewModels.EditTools.Background { public class BackgroundDocumentContentViewModel : BindableBase,INavigationAware { public IEventAggregator eventAggregator; public CPDFViewer PDFViewer; public BackgroundDocumentContentViewModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; eventAggregator.GetEvent().Subscribe(SetBackground); } public void SetBackground( BackgroundInfo backgroundInfo) { } public bool IsNavigationTarget(NavigationContext navigationContext) { return true; } public void OnNavigatedFrom(NavigationContext navigationContext) { } public void OnNavigatedTo(NavigationContext navigationContext) { navigationContext.Parameters.TryGetValue(ParameterNames.PDFViewer, out PDFViewer); } } }