我正在为Windows Phone 8.1运行时开发应用程序,即存储应用程序。这里我将 Storyboard 动画应用于 stackpanel ,
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="StkPnl">
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.2"/>
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="StkPnl">
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.2"/>
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
</DoubleAnimationUsingKeyFrames>
我在这里缩放它:
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.2"/>
<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/>
意味着从0.2到1而不是从0到1.
我的问题是:如果我将对象(此处为stackpanel)从0.2缩放到1,它看起来像模糊,直到动画结束。如果我从0到1这样做,那么效果很好。
更新1:
<StackPanel x:Name="StkPnlName" Visibility="Collapsed" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,512,0,0" RenderTransformOrigin="0.5,0.5">
<StackPanel.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<TranslateTransform/>
</TransformGroup>
</StackPanel.RenderTransform>
<Grid>
<Ellipse Height="38" Width="38" Fill="Blue"/>
<FontIcon Glyph="ode" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" Foreground="White" FontFamily="{StaticResource Resource}"/>
</Grid>
<TextBlock Text="Text" Foreground="Black" MaxHeight="38" FontSize="14" TextAlignment="Center" Width="74" TextTrimming="WordEllipsis" TextWrapping="Wrap" Style="{StaticResource Resource}" FontWeight="SemiBold"/>
</StackPanel>
我缺少什么?任何人遇到这种情况请建议。 感谢。