예제 #1
0
 private void ViewModel_PreviewHide(object sender, EventArgs e)
 {
     foreach (Window wind in DockSite.GetAllFloatWindows(this))
     {
         wind.Close();
     }
 }
예제 #2
0
 private void ViewModel_PreviewShow(object sender, EventArgs e)
 {
     foreach (Window wind in DockSite.GetAllFloatWindows(this))
     {
         if (wind.WindowState == WindowState.Minimized)
         {
             wind.WindowState = WindowState.Normal;
         }
         wind.Show();
         wind.Activate();
         wind.Focus(); // needs focus so the Esc key will close (hide) the preview
     }
 }