wp8 入门到精通 动画
http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/index.htm#/?sref=transforms_ovw_animating_transforms
public Storyboard HideStoryBoard()
{
Storyboard storyboard = new Storyboard();
double num = 0.2;
DoubleAnimation animation = new DoubleAnimation();
Storyboard.SetTarget(animation, sp);
animation.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath("(UIElement.RenderTransform).(CompositeTransform.TranslateX)"));
animation.To = ;
animation.From = ((CompositeTransform)sp.RenderTransform).TranslateX;
animation.Duration = new Duration(TimeSpan.FromSeconds(num)); PowerEase ease = new PowerEase();
ease.EasingMode = EasingMode.EaseInOut;
ease.Power = 2.0;
animation.EasingFunction = ease; DoubleAnimation animationOpacity = new DoubleAnimation();
Storyboard.SetTarget(animationOpacity, sp);
animationOpacity.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath("UIElement.Opacity"));
animationOpacity.To = ;
animationOpacity.From = ;
animationOpacity.Duration = new Duration(TimeSpan.FromSeconds(num)); animationOpacity.SetValue(Storyboard.TargetNameProperty, "sp");
animationOpacity.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath("UIElement.Opacity")); Storyboard.SetTargetName(animationOpacity, sp.Name);
Storyboard.SetTargetProperty(animationOpacity, new PropertyPath(StackPanel.OpacityProperty)); storyboard.Children.Add(animation);
storyboard.Children.Add(animationOpacity);
return storyboard;
}
<Button x:Name="myStackPanel">
<Button.Triggers>
<EventTrigger>
<BeginStoryboard>
<Storyboard>
<ColorAnimation BeginTime="00:00:00" From="Red" To="Transparent" Duration="0:0:3"
Storyboard.TargetName="mySolidColorBrush"
Storyboard.TargetProperty="Color">
</ColorAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Button.Triggers>
<Button.Background>
<SolidColorBrush x:Name="mySolidColorBrush" Color="Red" />
</Button.Background>
</Button>
wp8 入门到精通 动画的更多相关文章
- wp8 入门到精通 虚拟标示符 设备ID
//获得设备虚拟标示符 wp8 public string GetWindowsLiveAnonymousID() { object anid = new object(); string anony ...
- wp8 入门到精通 仿美拍评论黑白列表思路
static bool isbool = false; private void BindGameDelete() { Tile tile = new Tile(); List<Color> ...
- wp8 入门到精通 生命周期
- wp8 入门到精通 定时更新瓷贴
public class ScheduledAgent : ScheduledTaskAgent { static ScheduledAgent() { Deployment.Current.Disp ...
- wp8 入门到精通 ImageCompress 图片压缩
//实例化选择器 PhotoChooserTask photoChooserTask = new PhotoChooserTask(); BitmapImage bimg; int newPixelW ...
- wp8 入门到精通 Gallery
<Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.Resources> ...
- wp8 入门到精通 MultiMsgPrompt
List<NotifyMsg> arraymsg = new List<NotifyMsg>(); List<NotifyInfo> ArrayNotifyInfo ...
- wp8 入门到精通 数据库更新字段(一)
public class UserInfoDB : BaseDB { public UserInfoDB() : base(@"Data Source=isostore:\MakeLove\ ...
- wp8 入门到精通 启动系统分享照片任务
PhotoChooserTask photoChooserTask = new PhotoChooserTask(); photoChooserTask.Completed += photoChoos ...
随机推荐
- Visual Studio IIS Express 不支持.json后缀的mime类型
vs默认web调试工具中并不支持.json后缀的mime类型. 如何解决,两个方案: 局部单应用:web.config: <system.webServer> .... <stati ...
- 在CentOS 7上利用systemctl添加自定义系统服务
每一个服务以.service结尾,一般会分为3部分:[Unit].[Service]和[Install],具体内容如下: [Unit]Description=*****After=network.ta ...
- 【原创】express3.4.8源码解析之中间件
前言 注意:旧文章转成markdown格式. 中间件(middleware)的概念来自于TJ的connect库,express就是建立在connect之上. 就如同connect的意思是 连接 一样, ...
- 【原创】angularjs1.3.0源码解析之directive
# Angular指令编译原理 前言 angular之所以使用起来很方便,是因为通常我们只需要在html里面引入一个或多个(自定义或内置的)指令就可以完成一个特定的功能(这也是angular推荐的方式 ...
- win7下搭建PHP环境
一.安装软件 1.apache下载地址:http://httpd.apache.org/download.cgi 2.php下载地址:http://windows.php.net/download/ ...
- zstu.4022.旋转数阵(模拟)
旋转数阵 Time Limit: 1 Sec Memory Limit: 64 MB Submit: 1477 Solved: 102 Description 把1到n2的正整数从左上角开始由外层 ...
- Integer Inquiry
Integer Inquiry Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Sub ...
- unity3d的四元数 Quaternion
原地址:http://www.cnblogs.com/88999660/archive/2013/04/02/2995074.html 今天准备学习和研究下unity3d的四元数 Quaternion ...
- sql分页查询语句
有关分页 SQL 的资料很多,有的使用存储过程,有的使用游标.本人不喜欢使用游标,我觉得它耗资.效率低:使用存储过程是个不错的选择,因为存储过程是经过预编译的,执行效率高,也更灵活.先看看单条 SQL ...
- Linux tcp_wrappers 详解
tcp_wrappers是linux中一个安全机制[TCP_wrappers防火墙],一定程度上限制某种服务的访问权限,达到了保护系统的目的一. 要想用好tcp_wrappers,首先检查某种服务是否 ...