private void OnStart(object sender, EventArgs e) { // Setting up the FlightData window where all the Controls seats flight = new FlightData(); flightGearViewModel.DataViewModel = flight.DataContext as FlightDataViewModel; flightGearViewModel.UpdateSettings(); flight.Closed += Flight_Closed; OnNewWindow(e); flight.Show(); }