title: Using dynamic parameters for binding ElementName in styles. Reusing styles
body: <p>I have a question.
  I have created a style in WPF designer (XML) for TextBlocks. After IsMouseOver event is fired on any of two image controls, my textBlocks changes its positions. This style is used for some textBlocks.</p>
  
  <pre><code>&lt;Style x:Key="movingTextBlocksStyle" TargetType="{x:Type TextBlock}"&gt;
      &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding ElementName=image1, Path=IsMouseOver}" Value="True"&gt;
              &lt;Setter Property="RenderTransform"&gt;
                  &lt;Setter.Value&gt;
                      &lt;TranslateTransform/&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
              &lt;DataTrigger.EnterActions&gt;
                  &lt;BeginStoryboard&gt;
                      &lt;Storyboard&gt;
                          &lt;DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" From="0" To="-125"/&gt;
                      &lt;/Storyboard&gt;
                  &lt;/BeginStoryboard&gt;
              &lt;/DataTrigger.EnterActions&gt;
          &lt;/DataTrigger&gt;
          &lt;DataTrigger Binding="{Binding ElementName=image2, Path=IsMouseOver}" Value="True"&gt;
              &lt;Setter Property="RenderTransform"&gt;
                  &lt;Setter.Value&gt;
                      &lt;TranslateTransform/&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
              &lt;DataTrigger.EnterActions&gt;
                  &lt;BeginStoryboard&gt;
                      &lt;Storyboard&gt;
                          &lt;DoubleAnimation Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)" From="0" To="-125"/&gt;
                      &lt;/Storyboard&gt;
                  &lt;/BeginStoryboard&gt;
              &lt;/DataTrigger.EnterActions&gt;
          &lt;/DataTrigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>This style will be used as:</p>
  
  <pre><code>&lt;TextBlock x:Name="textBlock1" Style="{StaticResource movingTextBlocksStyle}"/&gt;
  &lt;TextBlock x:Name="textBlock2" Style="{StaticResource movingTextBlocksStyle}"/&gt;
  </code></pre>
  
  <p>My problem is that I want to reuse this style for another textBlocks: textBlock3 and textBlock4 where "Binding ElementName" differs, for example image3 and image4.
  I have thought that if there was any possibility to reuse this style with some type of dynamic parameter or argument, it would be great.
  I searched for any solution only as xml-code without any C# (I am using C# with WPF) or converter implementation.</p>
  
  <p>Thanks in advance.</p>