试图将“不透明度”的“当前”值放在DoubleAnimation.From中。我看得很彻底,但还没有找到答案。
<Style TargetType="{x:Type mr:MRWindow}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type mr:MRWindow}">
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="[I want the value (when the animation begins) of the opacity of MRWindow (that this style is applied to)]" Storyboard.TargetProperty="Opacity" ...../>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</ControlTemplate.Triggers>
<OtherThings Here ...../>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
感谢。
答案 0 :(得分:2)