locked
Animation - Help RRS feed

  • Question

  • Hello,

    I have the following Xaml code:

      <Storyboard x:Name="Storyboard1">
       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Image2" Storyboard.TargetProperty="(UIElement.Opacity)">
        <EasingDoubleKeyFrame KeyTime="00:00:03" Value="0.25"/>
        <EasingDoubleKeyFrame KeyTime="00:00:05" Value="0"/>
        <EasingDoubleKeyFrame KeyTime="00:00:05.4000000" Value="0.1"/>
       </DoubleAnimationUsingKeyFrames>
       <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Image1" Storyboard.TargetProperty="(UIElement.Opacity)">
        <EasingDoubleKeyFrame KeyTime="00:00:05.4000000" Value="0.1"/>
        <EasingDoubleKeyFrame KeyTime="00:00:06.5000000" Value="0.5"/>
        <EasingDoubleKeyFrame KeyTime="00:00:09" Value="0.75"/>
        <EasingDoubleKeyFrame KeyTime="00:00:11" Value="1"/>
       </DoubleAnimationUsingKeyFrames>
      </Storyboard>
     </UserControl.Resources>

     <Grid x:Name="LayoutRoot" Background="White">
      <Image x:Name="Image2" Margin="8,120,24,232" Source="arch_bug_slgn_blk.jpg"/>
      <Image x:Name="Image1" Margin="8,120,24,232" Source="arch_bug_slgn.jpg"/>
      </Grid>

    I would like to show Image2 first then Image1.  Right now it only shows Image1.  Can you please help me?  Thanks!!

    Wednesday, December 23, 2009 4:42 PM

All replies

  • Well Image 2 shows  at 25% Opacity first, then that decreases to 0% by 5 secs and goes up to 10% at 5.4 secs,
    which would probably explain it:

     it's near invisible at 3 seconds, then it becomes completely invisible by 5.

    If you want it to show itself first then up the opacity for the key time of 3 seconds
     
    Hope this helps at all

    The Admin Jr
    Languages: Visual Basic, C, C++, Python,HTML, XML, C#, JavaScript, XAML
    Wednesday, December 23, 2009 5:18 PM