title: Bind RenderTransform elements to code-behind variables
body: <p>I'm following the answers given in this thread here: <a href="https://stackoverflow.com/q/666856/343381">Access codebehind variable in XAML</a></p>
  
  <p>Here's what I'm trying to do:</p>
  
  <pre><code>&lt;Rectangle Name="MyRect" Fill="AliceBlue" MouseDown="Rectangle_MouseDown"&gt;
      &lt;Rectangle.RenderTransform&gt;
          &lt;TransformGroup&gt;
              &lt;RotateTransform Angle="0" CenterX="300" CenterY="150"/&gt;
              &lt;TranslateTransform X="{DynamicResource TransX}" Y="0"/&gt;
          &lt;/TransformGroup&gt;
      &lt;/Rectangle.RenderTransform&gt;
  &lt;/Rectangle&gt;
  </code></pre>
  
  <p>Then, I have a variable in my code behind which gets changed.  It's called TransX and I add it as a resource:</p>
  
  <pre><code>public double TransX = 0;
  
  public SvgPreview()
  {
      InitializeComponent();
      SvgPreview1.Resources.Add("TransX", TransX);
  }
  </code></pre>
  
  <p>The rectangle does get transformed properly from the start, however the transforms are not re-rendered to reflect changes in the TransX variable.  What should I do?</p>
  
  <p>Also, I have to do this exact same thing for several other values.</p>