我试图在加载 RibbonWindow 时显示淡入动画。
这是我所做的:
<ribbon:RibbonWindow.Resources>
<Storyboard x:Key="FadeInOnLoad">
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:2" FillBehavior="HoldEnd" >
<DoubleAnimation.EasingFunction>
<QuinticEase EasingMode="EaseIn"/>
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</ribbon:RibbonWindow.Resources>
<ribbon:RibbonWindow.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource FadeInOnLoad}"/>
</EventTrigger>
</ribbon:RibbonWindow.Triggers>
但是,RibbonWindow 并没有从透明开始,而是显示为黑色并逐渐淡入。
什么可能导致这种行为,我该如何解决?