Animation Windows Phone 8.1:使用情节提要的动画
我正在为windows phone 8.1运行时开发一个应用程序,即商店应用程序。在这里,我将故事板动画应用到stackpanelAnimation Windows Phone 8.1:使用情节提要的动画,animation,windows-runtime,storyboard,windows-phone-8.1,scaletransform,Animation,Windows Runtime,Storyboard,Windows Phone 8.1,Scaletransform,我正在为windows phone 8.1运行时开发一个应用程序,即商店应用程序。在这里,我将故事板动画应用到stackpanel 在这里,我将其缩放为: <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.2"/> <EasingDoubleKeyFrame KeyTime="0:0:2" Value="1"/> 表示从0.2到1,而不是从0到1 我的问题是:如果我将对象(这里是stackpanel)从0.2缩放到1,
在这里,我将其缩放为:
<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>
我错过了什么?任何人遇到这种情况,请提出建议。
谢谢。我不知道模糊对你来说意味着什么,但动画对我来说很好,你能提供截图吗,还可以提供stackpanel xaml部分。请参见更新1…模糊效果仅在我第一次使用EasingDoubleKeyFrame Value>0,第二次使用1时才会出现。在我的情况下,模糊效果不会出现,因为我在单击按钮时调用了动画。如果您在“OnNavigatedTo”上调用动画,它会出现。这似乎是一个bug,在另一个stackoverflow问题中讨论了这个问题,Filip Skakun找到了解决这个问题的窍门,检查这个:我在两个OnNaigatedTo上都做了,并且在两侧都单击了相同的效果。。。是否使用大于0的起始值。(此处为0.2)是的,当然。这就是我在OnNavigatedTo上调用动画时获得模糊效果的原因。
<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>