public void ApplicationStartup(object sender, StartupEventArgs e) { var mainWindowVm = new MainWindowVm(); var mainWindow = new MainWindow(mainWindowVm); mainWindow.Show(); }
public MainWindow(MainWindowVm mainWindowVm) { this.mainWindowVm = mainWindowVm; DataContext = mainWindowVm; Closing += (sender, e) => { Dispose(); }; InitializeComponent(); }