xml
---------------------------------------------
<Page
x:Class="MyApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
<Storyboard x:Key="std" x:Name="std" RepeatBehavior="Forever">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ttf" Storyboard.TargetProperty="Y" Duration="0:0:10">
<LinearDoubleKeyFrame KeyTime="0:0:2" Value="200"/>
<EasingDoubleKeyFrame KeyTime="0:0:6" Value="-300">
<EasingDoubleKeyFrame.EasingFunction>
<QuinticEase/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
<LinearDoubleKeyFrame KeyTime="0:0:10" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Page.Resources>
<Grid>
<Rectangle Width="100" Height="100" Fill="Khaki">
<Rectangle.RenderTransform>
<TranslateTransform x:Name="ttf"/>
</Rectangle.RenderTransform>
</Rectangle>
</Grid>
</Page>
C# code
----------------------------------------------
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
this.NavigationCacheMode = NavigationCacheMode.Required;
}
/// <summary>
在此页将要在
/// </summary>
/// <param name="e">描述如何访问此页的事件数据。
此参数通常用于配置页。</param>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
std.Begin();
}
}
UWP 动画之路径
原创
©著作权归作者所有:来自51CTO博客作者bruce1992的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:JVM体系结构详解

提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
uwp 动画之圆的放大与缩小
xml code <Page x:Class="MyA
xml microsoft ide -
android 路径动画制作
1、前言 今天项目要用到1个类似微信发送么么哒,那种屏幕飘表情的功能,所
移动开发 List ide i++ -
引导路径动画 (1)
引导路径动画(1) 在前面几节里,我们已经给大家介绍了一些动画效果,如飞机从山峰上飞过、辉光掠过文字等等,不知你注意一个...
Flash 中间件 生活 图层 时间轴