Silverlight には 3 つの UserControls があります。
UCOutside には、UCInside1 と UCInside2 という 2 つの UserControls が含まれています。
UserControl を含む
<!-- UCOutside -->
<UserControl.Resources>
<Storyboard x:Name="OutsideBoard">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="LayoutRoot">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="45"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<Grid x:Name="LayoutRoot">
<Grid.Projection>
<PlaneProjection/>
</Grid.Projection>
<local:UCInside1 Margin="39,35,266,173"/>
<local:UCInside2 HorizontalAlignment="Right" Margin="0,234,26,30" />
</Grid>
内部の最初の UserControl
<!-- UCInside1 -->
<UserControl.Resources>
<Storyboard x:Name="ImageFade">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="myImage">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:1.5" Value="0.2"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Top">
<Image x:Name="myImage" Margin="0" Source="/OtherImage.png" Stretch="Fill" Width="312" Height="250" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</Grid>
2 番目の UserControl 内部
<!-- UCInside2 -->
<UserControl.Resources>
<Storyboard x:Name="ButtonFade">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="image1">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" HorizontalAlignment="Left" Height="195" VerticalAlignment="Top" Width="218">
<Button Content="Button" HorizontalAlignment="Right" Margin="0,0,25,51" VerticalAlignment="Bottom" Width="75" Click="ClickButton"/>
<Image x:Name="image1" HorizontalAlignment="Left" Margin="41,32,0,70" Source="/Whatever.png" Stretch="Fill" Width="47"/>
</Grid>
ボタンの ClickButton イベントに気付くでしょう。また、すべての UserControls で指定された単純な Storyboards があることにも気付くでしょう。
問題は、3 つのアニメーションすべてをクリック イベントで開始するにはどうすればよいかということです。XAML または Blend を使用してすべてを結び付けることができますか? そうでない場合、C#コードでどのように行われますか?