0
我試着簡單地將故事板複製並粘貼到資源字典中,但它不起作用。那麼,我怎樣才能成功地將故事板動畫移動到資源字典中,以便主xaml文件儘可能乾淨且可讀?如何將silverlight故事板移動到resourceDictionary中?
這是我想對什麼是不工作可能有助於進入animationResource.xaml
<!-- the story board controlling the grid animation -->
<Storyboard x:Name="MoveBall">
<DoubleAnimation Duration="0:0:1" To="200" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="grid" d:IsOptimized="True">
<DoubleAnimation.EasingFunction>
<BackEase EasingMode="EaseInOut"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
<!-- I've left out all the other default xaml like the layoutRoot grid --->
<Grid x:Name="grid" HorizontalAlignment="Left" Margin="190,180,0,220" Width="80" RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Grid.RenderTransform>
<Ellipse Fill="#FFF4F4F5" Stroke="Black"/>
</Grid>