本文整理汇总了C#中Animation类的典型用法代码示例。如果您正苦于以下问题:C#Animation类的具体用法?C#Animation怎么用?C#Animation使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:OnButton3Clicked
voidOnButton3Clicked(objectsender,EventArgsargs)
{
Buttonbutton=(Button)sender;
//Createparentanimationobject.
AnimationparentAnimation=newAnimation();
//Create"up"animationandaddtoparent.
AnimationupAnimation=newAnimation(
v=>button.Scale=v,
1,5,Easing.SpringIn,
()=>Debug.WriteLine("upfinished"));
parentAnimation.Add(0,0.5,upAnimation);
//Create"down"animationandaddtoparent.
AnimationdownAnimation=newAnimation(
v=>button.Scale=v,
5,1,Easing.SpringOut,
()=>Debug.WriteLine("downfinished"));
parentAnimation.Insert(0.5,1,downAnimation);
//Commitparentanimation
parentAnimation.Commit(
this,"Animation3",16,5000,null,
(v,c)=>Debug.WriteLine("parentfinished:{0}{1}",v,c));
}
原文链接:
http://www.jxszl.com/biancheng/C/556536.html