private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (dw == null)
     {
         dw = new DetailWindow(vm)
         {
             Owner = this,
             WindowStartupLocation = WindowStartupLocation.CenterOwner
         };
         dw.Closed += DW_Closed;
         dw.Show();
     }
 }
 private void DW_Closed(object sender, System.EventArgs e) => dw = null;