При применении анимации до окончания Storyboard текст остается растянутым и размытым как на картинке. Если нажать Alt, то все становится нормальным
Анимация:
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="(UIElement.Opacity)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
<EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.2000000" Value="0.45"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.3000000" Value="0.1"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.4000000" Value="0.75"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.5000000" Value="0.3"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.6000000" Value="0.75"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.7000000" Value="0.22"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.8000000" Value="0.92"/>
<EasingDoubleKeyFrame KeyTime="00:00:01.9000000" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:02.2000000" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="-45"/>
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.023"/>
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.SkewX)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="57"/>
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="-76.993"/>
<EasingDoubleKeyFrame KeyTime="00:00:01" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
Элемент:
<Grid x:Name="Header" Grid.ColumnSpan="2" Height="91" VerticalAlignment="Top" Background="#116d6d6d" RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<CompositeTransform/>
</Grid.RenderTransform>
<TextBlock x:Name="textBlock1" Text="{Binding VideoElement.Header, UpdateSourceTrigger=PropertyChanged}" FontFamily="{StaticResource BoldFont}"
FontSize="45" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
</Grid>
При этом точно такая же анимация на точно таком же элементе на этом экране работает прекрасно.
Как можно исправить это проблему?
Чтобы избавиться от этого эффекта, необходимо начинать анимацию не с 00:00:00, а немного сдвинуть вперед. Достаточно на 1 миллисекунду, то есть KeyTime="00:00:00.01", тогда все работает как надо. Насколько я понял, то этот какой-то баг в системе анимаций UWP, либо так себя ведут анимации после Freeze()
Сборка персонального компьютера от Artline: умный выбор для современных пользователей