public DesignTimePrintJobViewModel() : base(new DesignTimeSettingsProvider(), new TranslationUpdater(new TranslationFactory(), new ThreadManager()), new DesignTimeJobInfoQueue(), new DesignTimeCommandLocator(), null, //IEventAggregator null, //ISelectedProfileProvider null, null, null, null, null, null) { var jobInfo = new JobInfo() { Metadata = new Metadata() { Author = "Max Mustermann", Keywords = "keywords...", PrintJobAuthor = "print job author", PrintJobName = "My Print Job", Subject = "This is the subject line", Title = "My Document Title" } }; var job = new Job(jobInfo, new ConversionProfile(), new Accounts()) { OutputFileTemplate = @"C:\My Documents\MyFile.pdf" }; job.Profile = ProfilesWrapper.First().ConversionProfile; SetNewJob(job); }
private void InitCombobox() { ProfilesWrapper = _profilesProvider?.Settings.Where(p => p.Guid != CurrentProfile.Guid).Select(x => new ConversionProfileWrapper(x)).ToObservableCollection(); _forwardProfile = ProfilesWrapper.FirstOrDefault(x => x.ConversionProfile.Guid == CurrentProfile.ForwardToFurtherProfile.ProfileGuid); // Important: SelectedProfile must be raised before Profiles. // Otherwise, the UI will update the binding source and overwrite the selected profile. RaisePropertyChanged(nameof(ForwardProfileWrapper)); RaisePropertyChanged(nameof(ProfilesWrapper)); }