title: Change color of circle button when clicked in WPF
body: <p>I have this XAML code for a button. I need this button to just be a circle of a solid color.</p>
  
  <pre><code>&lt;Button x:Name="btn_Color" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Height="25" Width="25" BorderBrush="Black"&gt;
      &lt;Button.Template&gt;
          &lt;ControlTemplate TargetType="Button"&gt;
              &lt;Grid&gt;
                  &lt;Ellipse Fill="Black"/&gt;
              &lt;/Grid&gt;
          &lt;/ControlTemplate&gt;
      &lt;/Button.Template&gt;
  &lt;/Button&gt;
  </code></pre>
  
  <p>I want this button to change color when I click it, and be able to reuse this code for other buttons. I will use the color later for other things so I need to be able to access that data.
  I tried to add a PreviewMouseDown event to the Ellipse and change the property on <code>(Ellipse)sender</code> but I can't access the color of the Ellipse even if I add it a <code>x:Name</code> property. How can I achieve this? Thanks! :)</p>