title: How do I completely replace the content of a WPF button with a graphic path?
body: <p>I've deconstructed a standard WPF button using Blend and have managed to create a nicely styled button, but I cannot figure out how to make the path fill the interior of the button space (the button width and height). I am also not sure if I need to specify ContentPresenter or even if it is correct. I am after the text in the middle of the button (as normal) but with my graphic path behind it.</p>
  
  <p>Can anyone give me feedback on how to accomplish this? The style is defined as;</p>
  
  <pre><code>    &lt;ControlTemplate x:Key="CurvedButton" TargetType="{x:Type Button}"&gt;
          &lt;Grid&gt;
              &lt;Path Fill="#ff951c1f" Data="F1 M 64,16 C 64,24 56,31 48,31 L 15,31 C 7,31 0,24 0,16 C 0,7 7,0 15,0 L 48,0 C 56,0 64,7 64,16 Z" /&gt;
              &lt;ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" /&gt;
          &lt;/Grid&gt;
      &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p>The usage of this button is;</p>
  
  <pre><code>&lt;StackPanel&gt;
      &lt;Button Template="{StaticResource CurvedButton}" FontFamily="MS Trebuchet" FontSize="40" Width="200" Height="120" Foreground="Black"&gt;XXXXXXXXXXX&lt;/Button&gt;
  &lt;/StackPanel&gt;
  </code></pre>
  
  <p>When all is done, it should just look like a curvy red button.</p>
  
  <p>Thanks in advance</p>
  
  <p>Ryan</p>