title: How do I create a translation / move storyboard dynamically through code?
body: <p>I am trying to create the following storyboard in code:</p>
  
  <pre><code>&lt;Storyboard x:Name="m_activateIdentityStoryboard"&gt;
          &lt;DoubleAnimationUsingKeyFrames 
              Storyboard.TargetProperty=
                    "(UIElement.RenderTransform).(CompositeTransform.TranslateY)" 
              Storyboard.TargetName="image"&gt;
              &lt;EasingDoubleKeyFrame KeyTime="0" Value="0"/&gt;
              &lt;EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="-22"/&gt;
          &lt;/DoubleAnimationUsingKeyFrames&gt;
      &lt;/Storyboard&gt;
  </code></pre>
  
  <p>I have tried the following:</p>
  
  <pre><code>    Storyboard board = new Storyboard();
      Storyboard.SetTarget(board, view);
      Storyboard.SetTargetProperty(board,
        new PropertyPath(CompositeTransform.TranslateYProperty));
  
      DoubleAnimation upAnim = new DoubleAnimation()
      {
        Duration = new Duration(TimeSpan.FromMilliseconds(200)),
        From = 0,
        To = -22,
        RepeatBehavior = new RepeatBehavior(1)
      };
      board.Children.Add(upAnim);
  </code></pre>
  
  <p>But it does nothing. I'm pretty sure I specifying the wrong PropertyPath, but I don't know what I'm supposed to put in it, or even how I am supposed to research what to put in it. I also dont understand what "(UIElement.RenderTransform).(CompositeTransform.TranslateY)" means and how to translate that into c#.</p>
  
  <p>Thanks!
  swine</p>