title: How to apply a style to button in WPF?
body: <p>I am trying to apply a style to button how can we achieve this?</p>
  
  <p>Below is my sample XAML, but it's not working</p>
  
  <pre><code>  &lt;Grid&gt;
      &lt;Button Width="150" Height="50"&gt;
          &lt;Button.Template&gt;
              &lt;ControlTemplate&gt;
                  &lt;Label Content="Helllo"/&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Button.Template&gt;
  
          &lt;Button.Style&gt;
              &lt;Style TargetType="Button"&gt;
                  &lt;Setter Property="Background" Value="Green"/&gt;  
                  &lt;Style.Triggers&gt;
                      &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                          &lt;Setter Property="Background" Value="AliceBlue"/&gt;
                      &lt;/Trigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/Button.Style&gt;
  
      &lt;/Button&gt;
  &lt;/Grid&gt;
  </code></pre>