title: Show loading window
body: <p>My application in WPF loads external resources, so I want to show a loading form while the program is loading.</p>
  
  <p>I tried to create the form, and show before the loading code, and close when loading ended.</p>
  
  <pre><code>private void Window_Loaded(object sender, RoutedEventArgs e)
  {
       LoadForm lf = new LoadForm();
       lf.Visibility = Visibility.Visible;
  
       // Al code that delays application loading
  
       lf.Close();
  }
  </code></pre>
  
  <p>But the only thing I get is that the form is showed when loading progress is complete and immediately closes.</p>
  
  <p>I think that I need to use System.Threading but not sure.</p>
  
  <p>Thanks.</p>
  
  <p><strong>Note</strong> I load all application external resources in Window_Loaded() method and not in the main class method.</p>