using PDF_Office.EventAggregators; using Prism.Commands; using Prism.Events; using Prism.Mvvm; using Prism.Regions; using System; using System.Collections.Generic; using System.Linq; namespace PDF_Office.ViewModels.EditTools.HeaderFooter { public class HeaderFooterTemplateListContentViewModel : BindableBase, INavigationAware { public IEventAggregator eventAggregator; public DelegateCommand EnterCreateCommand { get; set; } public string Unicode = null; public HeaderFooterTemplateListContentViewModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; Unicode = App.mainWindowViewModel.SelectedItem.Unicode; EnterCreateCommand = new DelegateCommand(EnterCreate); } public void EnterCreate() { this.eventAggregator.GetEvent().Publish(new EnumTemplateListOrCreateUnicode { Unicode = Unicode, Status = EnumTemplateListOrCreate.StatusCreate }); } public bool IsNavigationTarget(NavigationContext navigationContext) { return true; } public void OnNavigatedFrom(NavigationContext navigationContext) { } public void OnNavigatedTo(NavigationContext navigationContext) { } } }