title: Can you do "math" within WPF Styles that are data-bound
body: <p>I have a button control style and I want to change the padding from whatever the data-bound version is to adjust for a glyph that needs a 2 pixel offset.  I'll use SimpleButton from SimpleStyles.xaml as an example (... shows where the trigger code was removed for conciseness):</p>
  
  <pre><code>&lt;Style x:Key="SimpleButton" TargetType="{x:Type Button}" BasedOn="{x:Null}"&gt;
    &lt;Setter Property="FocusVisualStyle" Value="{DynamicResource SimpleButtonFocusVisual}"/&gt;
    &lt;Setter Property="Background" Value="{DynamicResource NormalBrush}"/&gt;
    &lt;Setter Property="BorderBrush" Value="{DynamicResource NormalBorderBrush}"/&gt;
    &lt;Setter Property="Template"&gt;
      &lt;Setter.Value&gt;
          &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
              &lt;!-- We use Grid as a root because it is easy to add more elements to customize the button --&gt;
             &lt;Grid x:Name="Grid"&gt;
               &lt;Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"/&gt;
  
                &lt;!-- Content Presenter is where the text content etc is placed by the control. The bindings are useful so that the control can be parameterized without editing the template --&gt;
               &lt;ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True"/&gt;
             &lt;/Grid&gt;
       ...
      &lt;/Setter.Value&gt;                     
    &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>What I want to do is add some extra margin where Padding="{TemplateBinding Padding}".  Something like Padding="{TemplateBinding Padding} + 2,0,0,0".</p>
  
  <p>Is there a XAML syntax to that?  If not, is there a best approach when doing this in code (Decorator?) ?</p>