title: Changing image source in code
body: <p>what i am trying to do is something like this on the mentioned event </p>
  
  <pre><code>    private void image1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
      {
              //this.animateIC1.Begin();
          Uri uri = new Uri("Images/1.png", UriKind.Relative);
          ImageSource imgSource = new BitmapImage(uri);
          this.imageBack1.Source = imgSource;
          this.Storyboard1.Begin();
      }
  </code></pre>
  
  <p>it has an animation which flips the front image and loads the backside image.</p>
  
  <p>so i am not able to achieve the desired output as it shows no image after flipping.</p>
  
  <p>this is my "secret" StoryBoard which is behaving perfectly in ExpressionBlend environment.</p>
  
  <pre><code>    &lt;Storyboard x:Name="Storyboard1"&gt;
          &lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="imageBack1"&gt;
              &lt;EasingDoubleKeyFrame KeyTime="0:0:1" Value="90"/&gt;
              &lt;EasingDoubleKeyFrame KeyTime="0:0:2" Value="0"/&gt;
          &lt;/DoubleAnimationUsingKeyFrames&gt;
          &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="imageBack1"&gt;
              &lt;DiscreteObjectKeyFrame KeyTime="0:0:1"&gt;
                  &lt;DiscreteObjectKeyFrame.Value&gt;
                      &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                  &lt;/DiscreteObjectKeyFrame.Value&gt;
              &lt;/DiscreteObjectKeyFrame&gt;
          &lt;/ObjectAnimationUsingKeyFrames&gt;
          &lt;DoubleAnimation Duration="0:0:1" To="90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="image1" d:IsOptimized="True"/&gt;
      &lt;/Storyboard&gt;
  </code></pre>