C# 单击按钮启动.xaml情节提要
在我的Silverlight应用程序中,我通过Blend手动制作了一个频闪板C# 单击按钮启动.xaml情节提要,c#,silverlight,C#,Silverlight,在我的Silverlight应用程序中,我通过Blend手动制作了一个频闪板 <UserControl.Resources> <Storyboard x:Name="Swivel"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName
<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中编写故事板,然后在.Start()中编写故事板,有没有办法做到这一点?查看MSDN上的事件触发器 您希望将ControlStoryboard动作绑定到按钮的单击事件。关于如何在Blend中添加动作。如果在资源面板中看不到ControlStoryboard操作,只需添加对Microsoft.Expression.Interactions.dll的引用。您可以在Blend SDK文件夹(在我的Win7 x64系统上,位于
C:\Program Files(x86)\Microsoft SDK\Expression\Blend\Silverlight\v5.0\Libraries
文件夹中)中找到它。您可以在按钮单击中执行SwivelDissapear.Begin()
。