title: Splash Screen with Animated GIF is not animating in WPF C#
body: <p>So here is the situation. I am currently working on a C# WPF Desktop Application and I wanted to add a Splash Screen when starting the program.</p>
  
  <p>But I am not using the SplashScreen class. I am using an additional WPF windows class on top of the app of the same name, and I call that class Splashy.</p>
  
  <p>My splash screen has an animated GIF image that works well when animated on the WebBrowser control of the Splashy class below...</p>
  
  <pre><code>&lt;Image gif:ImageBehavior.AnimatedSource="Images/FSIntro.gif" Margin="10,1,0,10"&gt;
      &lt;Image.OpacityMask&gt;
          &lt;ImageBrush ImageSource="Images/FSIntro.gif"/&gt;
      &lt;/Image.OpacityMask&gt;
  &lt;/Image&gt;
  </code></pre>
  
  <p>...and the Splashy class itself is initialized as a StartupUri below in the App.XAML. </p>
  
  <pre><code>&lt;Application
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           ...  ...
           ... (some text) ...
           ...  ...
           StartupUri="Splashy.xaml"&gt;
  &lt;Application.Resources&gt;
  </code></pre>
  
  <p>But the problem with that scenario is the <strong>splash screen just hangs</strong> and does not go into the main program itself.</p>
  
  <p>So I tried a different approach. One using code.</p>
  
  <p>And when I implement the following code to the Splash Screen and then implement it to my program to run the splash screen and then display the home screen, the splash screen does what I want to do <strong>but it does not animate</strong> as I would want.</p>
  
  <p>Below is the Splashy class code</p>
  
  <pre><code>public partial class Splashy : Window
  {
      public Intro()
      {
          InitializeComponent();
      }
  
      public void Outro()
      {
          this.Close();
      }
  }
  </code></pre>
  
  <p>And below is the program's method where the splashScreen is being implemented.</p>
  
  <pre><code>public partial class LoginScreen : Window
  {
      Splashy splash = new Splashy();
  
      public LoginScreen()
      {
  
          splash.Show();
          Thread.Sleep(5000);
          splash.Outro();
  
          // home screen 
      }
  }
  </code></pre>
  
  <p>Any pointers and help would be greatly appreciated.</p>