title: How can I both add a Style and a Template to a Button?
body: <p>How can I both add a Style and a Template to a Button?</p>
  <p>I have a Style with a DataTrigger that sets the background color of the Button to either Gray (if disabled) or Blue (if enabled).</p>
  <p>I also have a ControlTemplate that sets the CornerRadius to give it some rounded corners.</p>
  <p>Each of those two works individually. But when I add them both to the Button, the ControlTemplate takes precedence, and the Style with the DataTrigger is lost. I end up seeing a button with no border, and no background.</p>
  <p>How can I accomplish both of these tasks together?</p>
  <pre><code>&lt;Button Grid.Row=&quot;4&quot; Command=&quot;{Binding SubmitCommand}&quot;
          IsEnabled=&quot;{Binding IsSubmitButtonEnabled.Value}&quot;
          HorizontalAlignment=&quot;Stretch&quot; VerticalAlignment=&quot;Center&quot; FontSize=&quot;18px&quot; Height=&quot;36&quot;&gt;
  
      &lt;Button.Style&gt;
          &lt;Style TargetType=&quot;{x:Type Button}&quot;&gt;
              &lt;Setter Property=&quot;Background&quot; Value=&quot;Gray&quot; /&gt;
              &lt;Style.Triggers&gt;
                  &lt;DataTrigger Binding=&quot;{Binding IsSubmitButtonEnabled.Value}&quot; Value=&quot;True&quot;&gt;
                      &lt;Setter Property=&quot;Background&quot; Value=&quot;Blue&quot; /&gt;
                  &lt;/DataTrigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/Button.Style&gt;
  
      &lt;Button.Template&gt;
          &lt;ControlTemplate&gt;
              &lt;Border CornerRadius=&quot;20&quot;&gt;
                  &lt;TextBlock Text=&quot;Submit&quot;
                             HorizontalAlignment=&quot;Center&quot;
                             VerticalAlignment=&quot;Center&quot;
                             TextAlignment=&quot;Center&quot;
                             FontSize=&quot;16&quot;&gt;
                  &lt;/TextBlock&gt;
              &lt;/Border&gt;
          &lt;/ControlTemplate&gt;
      &lt;/Button.Template&gt;
  
  &lt;/Button&gt;
  </code></pre>