title: Grid Background Image using ImageBrush
body: <p>I wish to use an <code>ImageBrush</code> in XAML to apply a background to a <code>Grid</code>.</p>
  
  <p>I've given the brush a <code>x:Key</code> and want to refer to it in my grid.</p>
  
  <p>Sadly, it doesn't come up with the image as a background at all.</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;ImageBrush ImageSource="/MAQButtonTest;component/images/bird_text_bg.jpg" x:Key="BackgroundSponge" /&gt;
      &lt;Style TargetType="TextBlock"&gt;
          &lt;Setter Property="OverridesDefaultStyle" Value="True"/&gt;
      &lt;/Style&gt;
      &lt;ControlTemplate TargetType="Button" x:Key="ButtonTemplate"&gt;
          &lt;Grid Width="444" ShowGridLines="False" SnapsToDevicePixels="True" Background="{DynamicResource BackgroundSponge}"&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height="51" /&gt;
                  &lt;RowDefinition Height="36" /&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;Grid Grid.Row="0" Background="#286c97"&gt;
  
              &lt;/Grid&gt;
              &lt;Grid Grid.Row="1" Background="#5898c0"&gt;
                  &lt;ContentPresenter Grid.Row="0" /&gt;
              &lt;/Grid&gt;
          &lt;/Grid&gt;
      &lt;/ControlTemplate&gt;
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>I think I'm probably referring to it in the wrong way, I've tried <code>DynamicResource</code> and <code>StaticResource</code>.</p>