title: How to use a custom style for different controls in XAML
body: <p>I have coded a custom style for a button in a ressource-dic. My question is, is it possible to use this style for different buttons? Means that I need to set params by calling the style to switch die picture target. (How?)</p>
  
  <p>Window:</p>
  
  <pre><code>&lt;Button .... Style="{DynamicResource downloadButtonStyle}" IsEnabled="True"  /&gt;
  </code></pre>
  
  <p>RessourceDic:</p>
  
  <pre><code>&lt;Style x:Key="downloadButtonStyle" TargetType="{x:Type Button}"&gt;
      &lt;Setter Property="IsEnabled" Value="True" /&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate&gt;
                  &lt;Image x:Name="PART_img" Source="/FtpUploadClient;component/media/box_48.png"/&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                          &lt;Setter TargetName="PART_img" Property="Source" Value="/FtpUploadClient;component/media/box_download_48.png" /&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsEnabled" Value="False"&gt;
                          &lt;Setter TargetName="PART_img" Property="Source" Value="/FtpUploadClient;component/media/box_deactivated_48.png" /&gt;
                      &lt;/Trigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>