title: How to set a background of WPF Window?
body: <p>I have a simple WPF window. I intend to set it's background to be one of the images I added to project as Embedded Resource. This is what I tried:</p>
  
  <pre><code>&lt;Window x:Class="A_Boggle.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="A-Boggle" Height="300" Width="625" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Name="Game"&gt;
  &lt;Window.Background&gt;
      &lt;ImageBrush ImageSource="background.jpg"&gt;&lt;/ImageBrush&gt;
  &lt;/Window.Background&gt;
  &lt;Grid&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>But with this, i always get this: "Error 1 The file splash.jpg is not part of the project or its 'Build Action' property is not set to 'Resource'."</p>
  
  <p>Any ideas?</p>