title: WPF rotate animation
body: <p>I'm working with WPF and I can't achieve an animation.</p>
  
  <p>I have a rectangle which rotates from x degree with a render transform origin from 0,0.
  I want this rectangle to rotates from y degrees with a render transform origin from 0,1 after 2 seconds.</p>
  
  <p>Of course I want to keep the rectangle position for the second animation.</p>
  
  <p>My problem is when I change the rendertransform origin and apply the second rotation the current position is not kept and he moves from the initial location.</p>
  
  <p>Any idea how I can achieve this?</p>
  
  <p>Thank's for helping.</p>
  
  <pre><code>&lt;Window x:Class="SimpleMove"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="OpenWWindow" Height="900" Width="900"&gt;
    &lt;Grid &gt;
      &lt;Rectangle Name="rec1" Width="100" Height="400" Fill="DimGray" RenderTransformOrigin="0,0"&gt;
        &lt;Rectangle.RenderTransform&gt;
          &lt;RotateTransform x:Name="Rec1_Rotate"/&gt;
        &lt;/Rectangle.RenderTransform&gt;
      &lt;/Rectangle&gt;
  
      &lt;Button Width="45" Height="30" Name="Button1"&gt;Start
        &lt;Button.Triggers&gt;
          &lt;EventTrigger RoutedEvent="Button.Click"&gt;
            &lt;EventTrigger.Actions&gt;
              &lt;BeginStoryboard&gt;
                &lt;Storyboard TargetProperty="Angle"&gt;                
                  &lt;DoubleAnimation Storyboard.TargetName="Rec1_Rotate" By="40" Duration="00:00:1" BeginTime="00:00:00"/&gt;                                                
                  &lt;PointAnimation Storyboard.TargetName="rec1" Storyboard.TargetProperty="RenderTransformOrigin" To="0,1" Duration="00:00:0" BeginTime="00:00:02" /&gt;
                  &lt;DoubleAnimation Storyboard.TargetName="Rec1_Rotate" By="-80" Duration="00:00:2" BeginTime="00:00:03"/&gt;
                &lt;/Storyboard&gt;
              &lt;/BeginStoryboard&gt;
            &lt;/EventTrigger.Actions&gt;
          &lt;/EventTrigger&gt;
        &lt;/Button.Triggers&gt;
      &lt;/Button&gt;
    &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>