wpf 帧动画
帧动画实现很简单
<ImageBrush x:Key="speed_s" Stretch="Fill" ImageSource="/images/air/speed_s.png" />
<ImageBrush x:Key="speed_m" ImageSource="/images/air/speed_m.png" />
<ImageBrush x:Key="speed_l" ImageSource="/images/air/speed_l.png" /> <Storyboard x:Name="FrameAnim">
<ObjectAnimationUsingKeyFrames Duration="0:0:1.6" RepeatBehavior="Forever" Storyboard.TargetName="WindSpeedThumb" Storyboard.TargetProperty="Fill">
<DiscreteObjectKeyFrame KeyTime="0:0:0.4" Value="{StaticResource speed_s}" />
<DiscreteObjectKeyFrame KeyTime="0:0:0.8" Value="{StaticResource speed_m}" />
<DiscreteObjectKeyFrame KeyTime="0:0:1.2" Value="{StaticResource speed_l}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard> <Grid Margin="0,0,28,40" Width="98" Height="98" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<!--<Image Width="35" Margin="0,10,0,0" Stretch="Uniform" VerticalAlignment="Top" Source="/images/air/direction_0.png" />-->
<Rectangle x:Name="WindDirectionThumb" Width="35" Height="35" Margin="0,10,0,0" VerticalAlignment="Top" Fill="{StaticResource direction_0}" />
<pretty:PrettyButton x:Name="WindDirection" Margin="0,0,0,-7" Width="97" Height="55" VerticalAlignment="Bottom" PressedBrush="{StaticResource ac_winddirection_s}" NormalBrush="{StaticResource ac_winddirection_d}" />
</Grid>
代码中使用begin开始,stop结束动画
FrameAnim.Begin(); FrameAnim.Stop();
wpf 帧动画的更多相关文章
- WPF成长之路------帧动画(1)
最近公司的一个项目因为是WPF的,而自己已经很长一段时间没有接触过WPF了,再加上之前没有做过wpf的动画效果,因此在学习的过程中也顺便记录一下,说不定以后还会用上,同时也算是总结一下吧!刚开始写博客 ...
- Android动画总结#补间动画(Tween Animation/View Animation) #帧动画(Frame Animation/Drawable Animation)#属性动画(PropertyAnimation)
1.共有三种动画,英文名字多种叫法如下 第一种动画:补间动画(Tween Animation/View Animation) 四个:RotateAnimation旋转. AlphaAnimation透 ...
- WPF弹性模拟动画
原文:WPF弹性模拟动画 我们此次将要制作模拟物理中的弹性现象的交互动画,我们让一个小球向鼠标点击位置移动,这个移动的轨迹不是简单的位移,而是根据胡克定律计算得出的. 胡克定律:F=-kd F代表弹性 ...
- WPF之动画
原文:WPF之动画 线性关键帧.不连续关键帧动画: <Window.Triggers> <EventTrigger RoutedEvent="Window.Loaded&q ...
- 深入理解CSS3 Animation 帧动画
CSS3我在5年之前就有用了,包括公司项目都一直在很前沿的技术. 最近在写慕课网的七夕主题,用了大量的CSS3动画,但是真的沉淀下来仔细的去深入CSS3动画的各个属性发现还是很深的,这里就写下关于帧动 ...
- Android动画效果之Frame Animation(逐帧动画)
前言: 上一篇介绍了Android的Tween Animation(补间动画) Android动画效果之Tween Animation(补间动画),今天来总结下Android的另外一种动画Frame ...
- android 帧动画,补间动画,属性动画的简单总结
帧动画——FrameAnimation 将一系列图片有序播放,形成动画的效果.其本质是一个Drawable,是一系列图片的集合,本身可以当做一个图片一样使用 在Drawable文件夹下,创建ani ...
- android 帧动画
首先在res/drawable/name1.xml/定义一组图片集合: <?xml version="1.0" encoding="utf-8"?> ...
- 3d图片切换(css3帧动画)
效果带抖动翻转隐藏,使用帧动画 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"&g ...
随机推荐
- Linux下KVM的图形界面管理工具(virt-manager)(桌面版)
背景: virt-manager是用于管理KVM虚拟环境的主要工具,virt-manager默认设置下需要使用root用户才能够使用该工具.当你想在KVM hypervisor服务器上托管虚拟机,由最 ...
- uboot显示logo的方式
转:http://blog.chinaunix.net/uid-22030783-id-3257554.html 本文使用uboot2010.03版本,2010.06版本同样适用,在XC2440板上实 ...
- Android Context作为参数传递this
来自:http://blog.csdn.net/sswmjoy/article/details/46119285将弹出框作为函数封装后参数为Context,供其他的类调用时,将this作为参数传入,总 ...
- Delphi 对象模型学习笔记(转)
摘要 Borland Object Pascal 对象模型(现在已经正是命名为 Delphi 语言)与其他 OOP 语言一样,都提供了一些基础服务: 如对象创建服务.对象释放服务.对象识别服务 ...
- TensorFlow------读取CSV文件实例
TensorFlow之读取CSV文件实例: import tensorflow as tf import os def csvread(filelist): ''' 读取CSV文件 :param fi ...
- http://www.blogjava.net/crespochen/archive/2011/04/22/348819.html
http://blog.csdn.net/supersky07/article/details/7407523 http://blog.csdn.net/cuker919/article/detail ...
- C# http Post 方法
摘自: http://geekswithblogs.net/rakker/archive/2006/04/21/76044.aspx Http Post in C# Searched out on t ...
- Intellij IDEA中使用log4j日志
一.在pom.xml中添加依赖 <dependency> <groupId>log4j</groupId> <artifactId>log4j</ ...
- wireshark在windows下无法抓取localhost数据包
在调试SSL时要抓包,通过tcpview和minisniffer等工具明明看到tcp连接已经建立并开始收发数据了,但wireshark却总是无法抓到相应的数据包. 今天早上,HQ的高工告诉我“wire ...
- RocketMQ概念整理
DefaultMessageStore 消息的存储和提取. 相对重要的两个方法: 消息存储 PutMessageResult putMessage(MessageExtBrokerInner msg) ...