title: How to change the property of a controltemplate within the property template for a Style basedon another
body: <p>I am trying to set up custom styles for a project whilst maintaining of the implicit UWP styles and maintaining a lot of the implicit UWP style properties.</p>
  
  <p>In this example I want to keep all of the default UWP button styles and set a key to reference. This allows me to make a custom style based on this default</p>
  
  <p><strong>The default UWP style with key DefaultButtonStyle</strong></p>
  
  <pre><code>&lt;Style TargetType="Button" x:Key="DefaultButtonStyle"&gt;
          &lt;Setter Property="Background" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}" /&gt;
          &lt;Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/&gt;
          &lt;Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundTransparentBrush}" /&gt;
          &lt;Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" /&gt;
          &lt;Setter Property="Padding" Value="8,4,8,4" /&gt;
          &lt;Setter Property="HorizontalAlignment" Value="Left" /&gt;
          &lt;Setter Property="VerticalAlignment" Value="Center" /&gt;
          &lt;Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" /&gt;
          &lt;Setter Property="FontWeight" Value="Normal" /&gt;
          &lt;Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" /&gt;
          &lt;Setter Property="UseSystemFocusVisuals" Value="True" /&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="Button"&gt;
                      &lt;Grid x:Name="RootGrid" Background="{TemplateBinding Background}"&gt;
                          &lt;VisualStateManager.VisualStateGroups&gt;
                              &lt;VisualStateGroup x:Name="CommonStates"&gt;
                                  &lt;VisualState x:Name="Normal"&gt;
                                      &lt;Storyboard&gt;
                                          &lt;PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/&gt;
                                      &lt;/Storyboard&gt;
                                  &lt;/VisualState&gt;
                                  &lt;VisualState x:Name="PointerOver"&gt;
                                          &lt;Storyboard&gt;
                                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background"&gt;
                                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundPointerOver}"/&gt;
                                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"&gt;
                                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPointerOver}"/&gt;
                                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"&gt;
                                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundPointerOver}"/&gt;
                                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                                              &lt;PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/&gt;
                                          &lt;/Storyboard&gt;
                                      &lt;/VisualState&gt;
                                  &lt;VisualState x:Name="Pressed"&gt;
                                      &lt;Storyboard&gt;
                                          &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background"&gt;
                                              &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundPressed}"/&gt;
                                          &lt;/ObjectAnimationUsingKeyFrames&gt;
                                          &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"&gt;
                                              &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushPressed}"/&gt;
                                          &lt;/ObjectAnimationUsingKeyFrames&gt;
                                          &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"&gt;
                                              &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundPressed}"/&gt;
                                          &lt;/ObjectAnimationUsingKeyFrames&gt;
                                          &lt;PointerDownThemeAnimation Storyboard.TargetName="RootGrid"/&gt;
                                      &lt;/Storyboard&gt;
                                  &lt;/VisualState&gt;
                                  &lt;VisualState x:Name="Disabled"&gt;
                                          &lt;Storyboard&gt;
                                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Background"&gt;
                                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBackgroundDisabled}"/&gt;
                                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"&gt;
                                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonBorderBrushDisabled}"/&gt;
                                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"&gt;
                                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ButtonForegroundDisabled}"/&gt;
                                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                                          &lt;/Storyboard&gt;
                                  &lt;/VisualState&gt;
                              &lt;/VisualStateGroup&gt;
                          &lt;/VisualStateManager.VisualStateGroups&gt;
                          &lt;ContentPresenter x:Name="ContentPresenter"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="{TemplateBinding BorderThickness}"
                                            Content="{TemplateBinding Content}"
                                            ContentTransitions="{TemplateBinding ContentTransitions}"
                                            ContentTemplate="{TemplateBinding ContentTemplate}"
                                            Padding="{TemplateBinding Padding}"
                                            HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                            AutomationProperties.AccessibilityView="Raw"/&gt;
                      &lt;/Grid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>I am then wanting to create a custom style based on this style, and only change the properties that are necessary (this allows me to keep track of the properties I am changing very easily)</p>
  
  <p><strong>My custom style basedon the DefaultButtonStyle</strong></p>
  
  <pre><code>        &lt;Style TargetType="Button" x:Key="CustomButtonStyle" BasedOn="{StaticResource DefaultButtonStyle}"&gt;
          &lt;Setter Property="Padding" Value="3,3,3,3"/&gt;
          &lt;Setter Property="FocusVisualMargin" Value="-3"/&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="Button"&gt;
                      &lt;Grid CornerRadius="15"&gt;
                      &lt;/Grid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>My issue is that I want to change properties for the control template within the template property. However, as you would expect, in the code above when I try to set the CornerRadius of the grid to 15, this is the only property for my ControlTemplate (i.e. none of the default style properties are kept).</p>
  
  <p>At a guess I probably need another key reference somewhere for my control template or grid. I would preferably not like to copy and paste the controltemple in full as the purpose of setting it up this way is to make it very obvious which properties I'm changing.</p>
  
  <p>Any help much appreciated.</p>
  
  <p>Thanks,</p>