locked
Parallel Storyboards and BeginTime - Bug? RRS feed

  • Question

  • I am trying to play different storyboards on a usercontrol and have them play at their individual start times, but if the animations are the same it only plays the last one. Is there a way to add multiple storyboards and have them begin at their individual start times?

    Here is a  sample of 2 storyboards. They have the same animations, but only the last one plays. The second control has the same thing except different animations, and both of them play. is this a bug?

    <Canvas x:Name="Canvas">
            <ContentControl Name="TestControl3" Width="99" Height="76" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Canvas.Left="100" Canvas.Top="5">
                <ContentControl.Triggers>
                    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                        <BeginStoryboard>
                            <Storyboard AutoReverse="False" BeginTime="00:00:02" Name="Bounce3" RepeatBehavior="1x">
                                <Storyboard.Children>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.X)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.Y)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleX)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleY)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard.Children>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                        <BeginStoryboard>
                            <Storyboard BeginTime="00:00:10" Name="Spin3" RepeatBehavior="1x">
                                <Storyboard.Children>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[2].(RotateTransform.Angle)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:01" Value="-90" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:02" Value="-180" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:03" Value="-270" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:04" Value="-360" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard.Children>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </ContentControl.Triggers>
                <ContentControl.Resources>
                    <Storyboard AutoReverse="False" BeginTime="00:00:02" Name="Bounce4" RepeatBehavior="1x" x:Key="Bounce_0">
                        <Storyboard.Children>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.X)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.Y)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleX)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleY)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard.Children>
                    </Storyboard>
                    <Storyboard BeginTime="00:00:10" Name="Spin4" RepeatBehavior="1x" x:Key="Spin_1">
                        <Storyboard.Children>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[2].(RotateTransform.Angle)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:01" Value="-90" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:02" Value="-180" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:03" Value="-270" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:04" Value="-360" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard.Children>
                    </Storyboard>
                </ContentControl.Resources>
                <ContentControl.RenderTransform>
                    <TransformGroup>
                        <TransformGroup.Children>
                            <ScaleTransform ScaleX="1" ScaleY="1" />
                            <SkewTransform AngleX="0" AngleY="0" />
                            <RotateTransform Angle="0" />
                            <TranslateTransform X="0" Y="0" />
                        </TransformGroup.Children>
                    </TransformGroup>
                </ContentControl.RenderTransform>
                <TextBlock FontSize="20" FontWeight="Bold">Test</TextBlock>
            </ContentControl>
            <ContentControl Name="TestControl2" Width="99" Height="76" HorizontalAlignment="Center" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Canvas.Left="100" Canvas.Top="37" >
                <ContentControl.Triggers>
                    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                        <BeginStoryboard>
                            <Storyboard AutoReverse="False" BeginTime="00:00:02" Name="Bounce" RepeatBehavior="2x">
                                <Storyboard.Children>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.X)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.Y)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleX)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleY)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard.Children>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                    <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                        <BeginStoryboard>
                            <Storyboard AutoReverse="False" BeginTime="00:00:10" Name="Bounce1" RepeatBehavior="3x">
                                <Storyboard.Children>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.X)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.Y)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleX)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleY)">
                                        <DoubleAnimationUsingKeyFrames.KeyFrames>
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                        </DoubleAnimationUsingKeyFrames.KeyFrames>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard.Children>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </ContentControl.Triggers>
                <ContentControl.Resources>
                    <Storyboard AutoReverse="False" BeginTime="00:00:02" Name="Bounce" RepeatBehavior="2x" x:Key="Bounce_0">
                        <Storyboard.Children>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.X)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.Y)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleX)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleY)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard.Children>
                    </Storyboard>
                    <Storyboard AutoReverse="False" BeginTime="00:00:10" Name="Bounce1" RepeatBehavior="3x" x:Key="Bounce_1">
                        <Storyboard.Children>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.X)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[3].(TranslateTransform.Y)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleX)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children).[0].(ScaleTransform.ScaleY)">
                                <DoubleAnimationUsingKeyFrames.KeyFrames>
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.9000000" Value="1" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.2" />
                                    <SplineDoubleKeyFrame KeyTime="00:00:01.3000000" Value="1" />
                                </DoubleAnimationUsingKeyFrames.KeyFrames>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard.Children>
                    </Storyboard>
                </ContentControl.Resources>
                <ContentControl.RenderTransform>
                    <TransformGroup>
                        <TransformGroup.Children>
                            <ScaleTransform ScaleX="1" ScaleY="1" />
                            <SkewTransform AngleX="0" AngleY="0" />
                            <RotateTransform Angle="0" />
                            <TranslateTransform X="0" Y="0" />
                        </TransformGroup.Children>
                    </TransformGroup>
                </ContentControl.RenderTransform>
                <TextBlock FontSize="20" FontWeight="Bold">Test</TextBlock>
            </ContentControl>
        </Canvas>

     

    Monday, August 17, 2009 12:48 PM

Answers

  • I Realize what i was doing wrong here from another thread. I have to nest the storyboards inside another storyboard.

    Correct way ->

    <BeginStoryboard>
        <Storyboard x:Name="Animation">
            <Storyboard x:Name="FadeInStoryboard"/>
            <Storyboard x:Name="FadeOutStoryboard"/>
        </Storyboard
    </BeginStoryboard>
    • Marked as answer by TWester Monday, August 17, 2009 3:06 PM
    Monday, August 17, 2009 3:06 PM