public MainWindow() { InitializeComponent(); Toaster.SetParent(this); searchFrame.Visibility = Visibility.Hidden; DataContext = MainController.Instance; MainController.MainFrame = mainFrame; MainController.SearchFrame = searchFrame; MainController.ProgressBar = progressBar; log.Info("Main Window Started"); this.Closed += MainWindow_Closed; }