一:StoryBoard

一般翻译成演示图版或者故事板,就像电影中的情节串联板,它是一个动画时间线的容器。

二:动画的分类

      简单动画:以Animation结尾,例如DoubleAnimation

   关键帧动画:以AnimationUsingKeyFrames结尾

  简单动画主要是定义两个值,一个起点,一个终点,在两个值之间生成动画,可以用来满足简单的动画需求。

  关键帧动画更好理解,你可以像flash里一样,通过不同的关键帧来定义动画。这样做的动画会比简单动画来的细致一些。

三:VisualState

在上一篇中,通过编辑模板vs会自动生成一个对应控件的Style。我们可以在VisualStateManager里改一下不同状态下的控件样式。

<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="RootGrid">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<Storyboard>
<DoubleAnimation Duration="0:0:0.5" From="" To="0.1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Mask" ></DoubleAnimation>
</Storyboard>
</VisualState>
<VisualState x:Name="PointerOver">
<Storyboard>
<DoubleAnimation Duration="0:0:0.5" From="0.2" To="" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Mask" ></DoubleAnimation>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0:0:0.5" From="0.2" To="" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Mask" ></DoubleAnimation>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Ellipse Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
Fill="{TemplateBinding Background}"></Ellipse>
<ContentPresenter x:Name="ContentPresenter"
AutomationProperties.AccessibilityView="Raw"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTransitions="{TemplateBinding ContentTransitions}"
Content="{TemplateBinding Content}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="{TemplateBinding Padding}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Ellipse Name="Mask" Fill="Black" Opacity="0.1"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>

每一个VisualState代表一个状态。Normal默认状态,PointerOver鼠标移上状态,Pressed鼠标安按下状态,Disabled不可用状态

通过简单动画DoubleAnimation来定义一些简单的动画。

  

---some words---

1.StoryBoard:故事板

-----the end-------

UWP 动画的更多相关文章

  1. win10 UWP 动画

    原文:win10 UWP 动画 本文告诉大家如何写同一个简单的动画. 动画入门 本文开始写一个简单的动画,只是移动矩形作为本文的例子. 在 UWP 移动元素的动画,可以使用 RenderTransfo ...

  2. UWP 动画系列之模仿网易云音乐动画

    一.前言 最近在弄毕业设计(那时坑爹选了制作个UWP商店的APP),一个人弄得烦躁,在这里记录一些在做毕业设计时的学习过程.由于我的毕业设计是做一个音乐播放器,那么Windows商店上优秀的软件当然是 ...

  3. uwp 动画Storyboard

    代码如下: <Page.Resources>        <Storyboard x:Name="storyboard">            < ...

  4. uwp 动画之圆的放大与缩小

    xml code --------------------------------------------------- <Page x:Class="MyApp.MainPage&q ...

  5. UWP 动画之路径

    xml --------------------------------------------- <Page x:Class="MyApp.MainPage" xmlns= ...

  6. [UWP小白日记-6]页面跳转过度动画

    前言 在学习中发现页面导航默认是没有过度动画的,直接就导航过去太粗暴了( ̄へ ̄),于是打算上动画结果不言而喻自己进了坑完全不懂动画,然后就是各种疯狂(´・_・`)的搜索资料看了后终于有点头绪. 再后来 ...

  7. win10 uwp 异步进度条

    本文主要讲我设计的几个进度条,还有如何使用异步控制进度条,如何使用动画做进度. 进度条可以参见:http://edi.wang/post/2016/2/25/windows-10-uwp-modal- ...

  8. dotnet 从入门到放弃的 500 篇文章合集

    本文是记录我从入门到放弃写的博客 博客包括 C#.WPF.UWP.dotnet core .git 和 VisualStudio 和一些算法,所有博客使用 docx 保存 下载:dotnet 从入门到 ...

  9. 2018-2-13-win10-UWP-动画

    title author date CreateTime categories win10 UWP 动画 lindexi 2018-2-13 17:23:3 +0800 2018-2-13 17:23 ...

随机推荐

  1. FFT用到的各种素数

    int MOD; inline int mul(int a, int b){ return (long long)a * b % MOD; } int power(int a, int b){ ; ) ...

  2. PR修改例子

    DATA: lt_items_old    LIKE TABLE OF bapiebanv   WITH HEADER LINE.   DATA: lt_items_new    LIKE TABLE ...

  3. string interpolation in sql server

    https://sqlserver.dev129.com/2018/01/29/string-interpolation-in-t-sql/ Most programming languages ha ...

  4. django错误 - Reason given for failure: CSRF cookie not set.

    练习Django表单提交时遇到如下问题: 在网上各种查找,终于找到了解决方法. 1.在from 表单中添加 {% csrf_token %} 2.在视图中添加 from django.template ...

  5. org.apache.hadoop.hbase.NotServingRegionException: Region is not online 错误

    当遇到如下错误的时候 可能以为是regionserver 挂掉或者其他原因导致连接不上regionserver  但后面提示了Hbase 表statistic_login 具体信息 Thu Jan 1 ...

  6. 聊聊Spring中的工厂

    BeanFactory是Spring IOC容器的根接口,定义了Bean工厂的最基础的功能特性,比如根据name获取指定bean等,根据不同用途它的子接口又对它的功能进行细化,比如是否是可列表的,是否 ...

  7. CCRect 构造函数的几个参数解释

    转自: http://blog.163.com/hzklclick_wy/blog/static/21550517520137139511839/     void CCRect::setRect(f ...

  8. robotframework:appium切换webview后,在第一个页面操作成功,跳转到第二个页面后,执行命令失败

    问题: 在用robot写手机淘宝app的自动化时,打开手机淘宝后,点击天猫国际,跳转到天猫国际页面,天猫国际页面是H5, 需要切换到对应的webview,切换到webview后,点击美妆菜单,跳转到美 ...

  9. html marquee 标签(转)

    该标签不是HTML3.2的一部分,并且只支持MSIE3以后内核,所以如果你使用非IE内核浏览器(如:Netscape)可能无法看到下面一些很有意思的效果该标签是个容器标签语法: <marquee ...

  10. bzoj4556

    后缀自动机+二分+倍增+线段树合并 后缀自动机真好用 后面一个串是固定的,那么我们要对前面的串进行一些操作.我们想既然是求lcp,那么我们得先翻转原串,这样前缀变成了后缀,然后二分一下,从d在自动机上 ...