How to Set Background Color Of Button in WPF
<p>Hello I want to change Background Color of my Button Onclick Event on Runtime.</p>

<pre><code>&lt;Button FontStyle="Normal" FontWeight="Normal" HorizontalAlignment="Right" Margin="0,0,30,535" Name="b9" Width="96" Height="95" VerticalAlignment="Bottom" Content="9" FontFamily="Verdana" Click="Button_Click" Visibility="Visible"&gt;
&lt;Button.Template&gt;
&lt;ControlTemplate&gt;
&lt;Rectangle Name="myRectangle" RadiusX="46.5" RadiusY="46.5" Stroke="LightYellow" StrokeThickness="3"&gt;
&lt;Rectangle.Fill&gt;
&lt;VisualBrush Opacity="0.7"&gt;
&lt;VisualBrush.Visual&gt;
&lt;TextBlock Background="Green" Foreground="LightYellow" Name="myTextBlock" Padding="10"&gt;Change Color&lt;/TextBlock&gt;
&lt;/VisualBrush.Visual&gt;
&lt;/VisualBrush&gt;
&lt;/Rectangle.Fill&gt;
&lt;/Rectangle&gt;
&lt;ControlTemplate.Triggers&gt;
&lt;Trigger Property="ButtonBase.IsPressed" Value="True"&gt;
&lt;Setter Property="Shape.Stroke" TargetName="myRectangle" Value="LightGreen" /&gt;
&lt;Setter Property="TextBlock.Background" TargetName="myTextBlock"&gt;
&lt;Setter.Value&gt;
&lt;LinearGradientBrush&gt;
&lt;GradientStop Color="DarkGreen" Offset="1" /&gt;
&lt;GradientStop Color="Green" Offset="0.5" /&gt;
&lt;GradientStop Color="DarkGreen" Offset="0" /&gt;
&lt;/LinearGradientBrush&gt;
&lt;/Setter.Value&gt;
&lt;/Setter&gt;
&lt;/Trigger&gt;
&lt;/ControlTemplate.Triggers&gt;
&lt;/ControlTemplate&gt;
&lt;/Button.Template&gt;
&lt;/Button&gt;
</code></pre>

<p>How i can get property of Background to set it On Runtime. </p>