C# 所有silverlight窗体的通用情节提要

C# 所有silverlight窗体的通用情节提要,c#,silverlight-4.0,C#,Silverlight 4.0,我有两个故事板,分别是OpenStory和CloseStory。我有许多用户控件作为表单,每当我打开和关闭时,我都需要调用故事板开始,如何为表单中的所有常见动画编写全局故事板 在app.xaml中 <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

我有两个故事板,分别是OpenStory和CloseStory。我有许多用户控件作为表单,每当我打开和关闭时,我都需要调用故事板开始,如何为表单中的所有常见动画编写全局故事板

在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>
在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>