在我的Silverlight应用程序中,我通过Blend手动创建了一个滑板。按下按钮点击.xaml故事板
<UserControl.Resources>
<Storyboard x:Name="Swivel">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="Menus">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="-90"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Menus">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
我想按下按钮点击此故事板。有没有办法做到这一点,而无需在.cs中编写故事板,然后storyboard.Start()等?
你可以在按钮单击中执行'SwivelDissapear.Begin()'。 – Zabavsky 2012-04-04 11:19:02