title: WPF Style Template for button
body: <p>I have a WPF application. I am trying to customise a button. Which I have partially achieved however I can not seem to set the background of my button to a RadialGradientBrush. I really can't see what I'm doing wrong. I also don't want any border for the button.</p>
  
  <p>Below is the code I have. Where I have the value for the property background it says token is not valid?</p>
  
  <pre><code>&lt;Application.Resources&gt;
   &lt;RadialGradientBrush x:Key="brushSecurityButtRadial"&gt;
          &lt;GradientStop Color="White" Offset="0"/&gt;
          &lt;GradientStop Color="Blue" Offset="0.3"/&gt;
      &lt;/RadialGradientBrush&gt;
  
  &lt;!-- style for button --&gt;
      &lt;Style x:Key="buttSecurity" TargetType="Button"&gt;
          &lt;Setter Property="Margin" Value="1,2,1,2"/&gt;
          &lt;Setter Property="HorizontalAlignment" Value="Center"/&gt;
          &lt;Setter Property="Background" Value="brushSecurityButtRadial"/&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="{x:Type Button}"&gt;                    
                      &lt;Grid&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition/&gt;
                              &lt;RowDefinition Height="2*"/&gt;
                          &lt;/Grid.RowDefinitions&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition/&gt;
                              &lt;ColumnDefinition/&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="GBP / USD" Style="{StaticResource txtSecurity}"/&gt;
                          &lt;Image Grid.Row="1" Grid.Column="0" Source="C:\Users\Mark\Documents\Visual Studio 2012\Country Flags\ICO\GBP.ico"/&gt;
                          &lt;Image Grid.Row="1" Grid.Column="1" Source="C:\Users\Mark\Documents\Visual Studio 2012\Country Flags\ICO\USD.ico"/&gt;
                      &lt;/Grid&gt;               
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  
  &lt;/Application.Resources&gt;
  </code></pre>