public MainController(System.Windows.Application app, MainWindow mainWindow) { Thread.Sleep(2000); App = app; mainWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; MainWindow = mainWindow; Ctx = new Contexte(); Auth_Controller = new Auth_ViewModel(Ctx); Auth_Controller.OKHandler += RunModelisator; Auth_Controller.CancelHandler += ExitModelisator; MainWindow.ContentPanel.Children.Add(Auth_Controller.View); SetupMainWindow(); }