private void MainWindow_Loaded(object sender, EventArgs e) { MainWinViewModel vm = ((MainWinViewModel)DataContext); vm.LoadConfig(); if (vm.TabsHistory.Count > 0) { ShowRecetlryUsedWindow(); } }
public MainWindow() { InitializeComponent(); DataContext = new MainWinViewModel(); MessengerStatic.AddTabWindowOpened += CreateAddTabWindow; MessengerStatic.RenameTabWindowOpened += CreateRenameTabWin; Closing += MainWindow_Closing; }