我有视觉状态=加载。我需要在这个视觉状态中显示加载圆圈,总是重复动画。但它只重复一次!如何将重复行为设置为永久?
<VisualState x:Name="LoadingChildNodes">
<Storyboard RepeatBehavior="Forever" AutoReverse="False">
<DoubleAnimation Duration="0" To="0.915" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="grid1" d:IsOptimized="True"/>
<DoubleAnimation
Duration="0:0:2" To="360" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="ellipse" d:IsOptimized="True"/>
</Storyboard>
</VisualState>
答案 0 :(得分:1)
找到解决方案:)
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="ellipse">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="360"/>
</DoubleAnimationUsingKeyFrames>