title: Using a DataTrigger to set the properties of a ScaleTransform
body: <p>A failed XAML attempt here - I'm obviously doing something stupid with the <code>Style</code>/<code>Setter</code> syntax. I just want to flip an element based on some bindings by setting the <code>ScaleX</code> and <code>ScaleY</code> properties of a <code>ScaleTransform</code> from a <code>DataTrigger</code>. <code>Setter.Property</code> obviously doesn't support a property path, but how can I get round this? I can't set the whole <code>RenderTransform</code> property because <code>ScaleX</code> and <code>ScaleY</code> are independent. Any ideas?</p>
  
  <pre><code>&lt;Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
     &lt;StackPanel&gt;
        &lt;TextBlock FontSize="50" RenderTransformOrigin=".5,.5"&gt;
           &lt;TextBlock.Style&gt;
              &lt;Style&gt;
                 &lt;Style.Triggers&gt;
                    &lt;DataTrigger Binding="{Binding IsChecked, ElementName=FlipX}" Value="True"&gt;
                       &lt;Setter Property="RenderTransform.ScaleX" Value="-1"/&gt;
                    &lt;/DataTrigger&gt;
                    &lt;DataTrigger Binding="{Binding IsChecked, ElementName=FlipY}" Value="True"&gt;
                       &lt;Setter Property="RenderTransform.ScaleY" Value="-1"/&gt;
                    &lt;/DataTrigger&gt;
                 &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
           &lt;/TextBlock.Style&gt;
           &lt;TextBlock.RenderTransform&gt;
            &lt;ScaleTransform/&gt;
           &lt;/TextBlock.RenderTransform&gt;
        Hello World
        &lt;/TextBlock&gt;
        &lt;CheckBox Name="FlipX"&gt;Flip x&lt;/CheckBox&gt;
        &lt;CheckBox Name="FlipY"&gt;Flip y&lt;/CheckBox&gt;
     &lt;/StackPanel&gt;
  &lt;/Page&gt;
  </code></pre>