故事板可以放在资源文件中,例如styles.xaml吗?我有一个工具栏,可以在许多页面中重复使用。我现在正在使用页面级资源:
<navigation:Page.Resources>
<Storyboard x:Name="sbToolbarInitialization">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)"
Storyboard.TargetName="Toolbar">
<EasingDoubleKeyFrame KeyTime="0"
Value="46" />
<EasingDoubleKeyFrame KeyTime="0:0:1"
Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<BackEase EasingMode="EaseOut" />
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</navigation:Page.Resources>
边境管制使用的:
<Border x:Name="Toolbar"
Style="{StaticResource ToolbarBorderStyle}">
<Border.RenderTransform>
<CompositeTransform />
</Border.RenderTransform>
<i:Interaction.Triggers>
<i:EventTrigger>
<ei:ControlStoryboardAction Storyboard="{StaticResource sbToolbarInitialization}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Border>
由于我已经在使用 style.xaml 文件来为边框设置格式,我还想将情节提要存储在那里。这可能吗?