title: WPF Visibility.Visible doesnt work when executing an external app from a WPF button;
body: <p>I have the following code to launch an external application. When I click the button, i need to make it so that the page is greyed out so I make a rectangle already on the page visible and full screen. </p>
  
  <pre><code>    private void uxOfficeApps_Click(object sender, RoutedEventArgs e)
      {
          Rectangle rect = FindChild&lt;Rectangle&gt;(ParentWindow, "rectangle1");
          rect.Height = _basePage.SCREEN_RESOLUTION_HEIGHT;
          rect.Width = _basePage.SCREEN_RESOLUTION_WIDTH;
          rect.Visibility = Visibility.Visible;
  
          string executablePath = _basePage.PATH_OFFICE;
          executable = new Process();
          executable.StartInfo.FileName = executablePath;
          executable.Start();
          executable.EnableRaisingEvents = true;
          executable.Exited += new EventHandler(officeApps_Exited);
          executable.WaitForExit();
     }
  </code></pre>
  
  <p>It works fine and the application waits and returns when my external application is closed, howver the rectangle is only displayed when the exitied event "officeApp_Exited" is executed, not before it was loaded as I would like. (the screen does not get updated)</p>
  
  <p>the exit event is</p>
  
  <pre><code>void officeApps_Exited(object sender, EventArgs e)
  {
          MessageBox.Show("I am back");
          // do further processing
  }
  </code></pre>
  
  <p>the Visibility does not work.</p>
  
  <p>However it does work when I put a MessageBox.Show("Alert") between making the rectangle visible and creating the process object.</p>
  
  <p>Does anyone know why ??? Please Help</p>