public MainWindow(Application application, PowerPointGraphicsCaptureItemsFactory pointGraphicsCaptureItemsFactory, IServiceProvider serviceProvider) { this.application = application; this.pointGraphicsCaptureItemsFactory = pointGraphicsCaptureItemsFactory; this.serviceProvider = serviceProvider; this.InitializeComponent(); this.Title += $" {Assembly.GetExecutingAssembly().GetName().Version}"; }
public PowerPointControl() { this.powerPointGraphicsCaptureItemsFactory = (Application.Current as App)?.AppHost.Services.GetRequiredService <PowerPointGraphicsCaptureItemsFactory>(); this.Dispatcher.ShutdownStarted += this.DispatcherShutdownStarted; this.Loaded += this.OnLoaded; this.Unloaded += this.OnUnloaded; this.IsVisibleChanged += this.OnIsVisibleChanged; }