title: WPF: MediaElement doesn't display at runtime
body: <p>This concerns WPF. The problem is that my MediaElement (actually a GIF) doesn't show up at runtime (so I only get an empty screen), even though it shows perfectly in the design mode. Before citing the code I note the following:</p>
  
  <ul>
  <li>The GIF-file in question has been added to the solution.</li>
  <li>Its BuildAction property is set to Resource (I've checked).</li>
  <li>When I replace the MediaElement by an Image element (and either use the same GIF-file or replace that source-file by a .png file), the image/GIF does display at runtime. Just not when it's used as a MediaElement.</li>
  <li>Closing and re-starting Visual Studio doesn't help.</li>
  <li>As I said (and just to emphasize, if I may), the GIF image does display in the design mode part of the screen - just not at runtime.</li>
  </ul>
  
  <p>And here's the code:</p>
  
  <pre><code>     &lt;Window x:Class="Testing.TestWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                  xmlns:local="clr-namespace:Testing"
                  mc:Ignorable="d"
                  Title="TestWindow" WindowState="Maximized"&gt;
          &lt;StackPanel&gt;
              &lt;MediaElement Source="pack://application:,,,/Images/untitled.gif" Stretch="Fill" Visibility="Visible" /&gt;
          &lt;/StackPanel&gt;
      &lt;/Window&gt;
  </code></pre>
  
  <p>Thanks.</p>