private void Application_Startup(object sender, StartupEventArgs e) { // create the main window and assign your datacontext MainWindow main; main = new MainWindow(); main.Show(); main.ShowOptionsWindow(); }