我有以下工作代码来通过绑定观察视图模型属性( IsSaveComplete )的真/假状态,然后触发故事板动画来更改显示在其中的图标淡入淡出过渡期间的按钮:
<Button Name="CircleButton" Margin="0 50 0 0" Style="{StaticResource MaterialDesignFloatingActionLightButton}"
Command="{Binding SaveComand}"
materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding IsSaving}"
materialDesign:ButtonProgressAssist.Value="{Binding SaveProgressButton}" Click="CircleButtonClick">
<!-- simple example of toggling/animating pack icon with a data trigger-->
<materialDesign:PackIcon Height="24" Width="24">
<materialDesign:PackIcon.Style>
<Style TargetType="materialDesign:PackIcon" BasedOn="{StaticResource {x:Type materialDesign:PackIcon}}">
<Setter Property="Kind" Value="CloudSync" />
<Style.Triggers>
<DataTrigger Binding="{Binding IsSaveComplete}" Value="True">
<Setter Property="Kind" Value="Check" />
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.8" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
</DataTrigger>
</Style.Triggers>
</Style>
</materialDesign:PackIcon.Style>
</materialDesign:PackIcon>
</Button>
我想做的是在内部故事板结束后触发淡出整个按钮。我无法找到直接对这些操作进行排序的方法。