Change this snippet from the template
<Border CornerRadius="2" BorderBrush="#387f38" BorderThickness="1"> <Border.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF5BB75B" Offset="0" /> <GradientStop Color="#FF449B44" Offset="1" /> </LinearGradientBrush> </Border.Background> <ContentPresenter x:Name="ButtonContentPresenter" VerticalAlignment="Center" HorizontalAlignment="Center"/> </Border>
To this (the important part is Background="{TemplateBinding Background}" ):
<Border CornerRadius="2" BorderBrush="#387f38" BorderThickness="1" Background="{TemplateBinding Background}"> <ContentPresenter x:Name="ButtonContentPresenter" VerticalAlignment="Center" HorizontalAlignment="Center"/> </Border>
And then add an extra setter to your style as follows:
<Setter Property="Background"> <Setter.Value> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF5BB75B" Offset="0" /> <GradientStop Color="#FF449B44" Offset="1" /> </LinearGradientBrush> </Setter.Value> </Setter>
Steve source share