title: Transparent PNG in WPF window
body: <p>I try to apply PNG image that has transparency into the whole window but the window is always white.</p>
  
  <p>Any clue to see PNG with its transparency?</p>
  
  <p>Thank you!</p>
  
  <p><strong>C#</strong></p>
  
  <pre><code>public SplashScreen()
          {
              InitializeComponent();
  
              var myBrush = new ImageBrush();
              var image = new Image
              {
                  Source = new BitmapImage(
                      new Uri(
                          "pack://application:,,,/MyApp;component/Images/Logo.png"))
              };
              myBrush.ImageSource = image.Source;
              Background = myBrush;
  
          }
  </code></pre>
  
  <p><strong>XAML</strong></p>
  
  <pre><code>&lt;Window x:Class="MyApp.SplashScreen"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Topmost="True"
          Title="SplashScreen" Height="400" Width="400" WindowStartupLocation="CenterScreen" WindowStyle="None" 
             BorderThickness="5" ShowInTaskbar="False" ResizeMode="NoResize" &gt;
      &lt;Grid Name="MainGrid"&gt;
          &lt;Label FontSize="10" Height="20" Foreground="White" Margin="0,0,0,0" Padding="10,0,0,5" Name="statusLabel"  VerticalAlignment="Bottom"&gt;&lt;/Label&gt;
          &lt;TextBlock  Visibility="Collapsed"  FontSize="10" Foreground="White"   Margin="18,110,18,30" Name="appInfo" TextAlignment="Center"&gt;
  
          &lt;/TextBlock&gt;
          &lt;TextBlock Visibility="Collapsed"  FontSize="20" Foreground="White"   Margin="0,83,0,90" Name="version" TextAlignment="Center"&gt;
  
          &lt;/TextBlock&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>