private void button_drawer_Click(object sender, RoutedEventArgs e) { if (windowDrawer == null) { windowDrawer = new DrawerMenu.MainWindow(); windowDrawer.Closed += (obj_sender, args) => windowDrawer = null; windowDrawer.Owner = this; windowDrawer.Show(); } windowDrawer.Focus(); }