private void MainWindow_Deactivate(object sender, EventArgs e) { if (CurrentWorkspace != null) { CurrentWorkspace.Deactivate(); } }