Double Key Frame sample code not working with May CTP
I can paste this into a WPF app and build it, but the button doesn't show up.
The designer reports and error if I try to view it, and then the XAML panew will report this error.
Error 2 Objects of type 'System.Windows.Media.Animation.BeginStoryboard' do not have child object collections. WinFxSpinButton\Window1.xaml 16 13 WinFxSpinButton
Note, I can run build and run the sample gallery app. without problems
Can you shed some light on this?
Here's the XAML source:
<!-- Demonstrates the DoubleAnimationUsingKeyFrames class. -->
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="keyframes_markup.DoubleAnimationUsingKeyFramesExample"
Name="myRootElement"
WindowTitle="DoubleAnimationUsingKeyFrames Example">
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<Button Name="myAnimatedButton" Margin="200" Width="120" RenderTransformOrigin="0.5,0.5">Click Me
<Button.RenderTransform>
<RotateTransform Angle="0" />
</Button.RenderTransform>
<Button.Triggers>
<EventTrigger RoutedEvent="Button.Click">
<BeginStoryboard>
<Storyboard>
<!-- Animates the angle of a RotateTransform. -->
<DoubleAnimationUsingKeyFrames
Storyboard.TargetName="myAnimatedButton"
Storyboard.TargetProperty="(Button.RenderTransform).(RotateTransform.Angle)"
Duration="0:0:10" FillBehavior="Stop">
<DoubleAnimationUsingKeyFrames.KeyFrames>
<LinearDoubleKeyFrame Value="300" KeyTime="0:0:3" />
<DiscreteDoubleKeyFrame Value="225" KeyTime="0:0:3.5" />
<DiscreteDoubleKeyFrame Value="180" KeyTime="0:0:4" />
<DiscreteDoubleKeyFrame Value="90" KeyTime="0:0:4.5" />
<SplineDoubleKeyFrame Value="-180" KeyTime="0:0:10" KeySpline="0.25,0.5 0.75,1" />
</DoubleAnimationUsingKeyFrames.KeyFrames>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
</Button>
</StackPanel>
</Page>

