所有silverlight表单的常用故事板

我有一个两个故事板formOpenStory和formCloseStory。我有许多用户控件作为表单,当我打开和关闭时,我需要调用故事板开始,如何为表单中的所有常见动画编写全局故事板。     
已邀请:
在app.xaml中
<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
         x:Class="SilverlightApplication1.App">


<Application.Resources>
<Storyboard x:Name="StoryBoard1">
  <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform)"  />
</Storyboard>
<Storyboard x:Name="StoryBoard2">
  <DoubleAnimation Duration="0:0:0.2" To="180" Storyboard.TargetProperty="(UIElement.RenderTransform)"  />
</Storyboard>
                                       你可以在任何你想要的地方使用
Storyboard sb = Application.Current.Resources["StoryBoard1"] as Storyboard;
  Storyboard.SetTarget(sb, myControl1);
  sb.Begin();    
    

要回复问题请先登录注册