예제 #1
0
 public void CustomMessageWindow_Loaded(object sender, RoutedEventArgs e)
 {
     if (this.Owner == null || InteropWindow.FindMainWindowState((Window)this) == WindowState.Minimized)
     {
         this.WindowStartupLocation = WindowStartupLocation.CenterScreen;
     }
     if (this.mButton2 == null)
     {
         return;
     }
     this.UpdateLayout();
 }
예제 #2
0
 public static WindowState FindMainWindowState(Window window)
 {
     return(window?.Owner == null ? window.WindowState : InteropWindow.FindMainWindowState(window.Owner));
 }