예제 #1
0
 private void btnPop_Click(object sender, RoutedEventArgs e)
 {
     if (popWindow == null)
     {
         popWindow         = new PopWindow();
         popWindow.Closed -= PopWindow_Closed;
         popWindow.Closed += PopWindow_Closed;
         popWindow.Owner   = Application.Current.MainWindow;
         popWindow.ShowDialog();
     }
     else if (!popWindow.IsActive)
     {
         popWindow.WindowState = WindowState.Normal;
         popWindow.Activate();
     }
 }
예제 #2
0
 private void PopWindow_Closed(object sender, EventArgs e)
 {
     popWindow = null;
 }