AnimationExtensions.Animate 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Animate(IAnimatable, String, Action<Double>, UInt32, UInt32, Easing, Action<Double,Boolean>, Func<Boolean>)
设置指定参数并启动动画。
public static void Animate (this Xamarin.Forms.IAnimatable self, string name, Action<double> callback, uint rate = 16, uint length = 250, Xamarin.Forms.Easing easing = default, Action<double,bool> finished = default, Func<bool> repeat = default);
static member Animate : Xamarin.Forms.IAnimatable * string * Action<double> * uint32 * uint32 * Xamarin.Forms.Easing * Action<double, bool> * Func<bool> -> unit
参数
- self
- IAnimatable
将对其运行此方法的对象。
- name
- System.String
动画持续时间内,在其同级和父级动画中应该唯一的动画键。
- callback
- System.Action<System.Double>
使用连续动画值调用的操作。
- rate
- System.UInt32
各帧之间经过的时间(以毫秒为单位)。
- length
- System.UInt32
执行内插动画操作的毫秒数。
- easing
- Easing
用于动画的切入、切出或进入和退出的缓动函数。
- finished
- System.Action<System.Double,System.Boolean>
动画结束时调用的操作。
- repeat
- System.Func<System.Boolean>
如果应继续动画便会返回 true 的函数。
适用于
Animate(IAnimatable, String, Animation, UInt32, UInt32, Easing, Action<Double,Boolean>, Func<Boolean>)
设置指定参数并启动动画。
public static void Animate (this Xamarin.Forms.IAnimatable self, string name, Xamarin.Forms.Animation animation, uint rate = 16, uint length = 250, Xamarin.Forms.Easing easing = default, Action<double,bool> finished = default, Func<bool> repeat = default);
static member Animate : Xamarin.Forms.IAnimatable * string * Xamarin.Forms.Animation * uint32 * uint32 * Xamarin.Forms.Easing * Action<double, bool> * Func<bool> -> unit
参数
- self
- IAnimatable
将对其运行此方法的对象。
- name
- System.String
动画持续时间内,在其同级和父级动画中应该唯一的动画键。
- animation
- Animation
要运行的动画。
- rate
- System.UInt32
各帧之间经过的时间(以毫秒为单位)。
- length
- System.UInt32
执行内插动画操作的毫秒数。
- easing
- Easing
用于动画的切入、切出或进入和退出的缓动函数。
- finished
- System.Action<System.Double,System.Boolean>
动画结束时调用的操作。
- repeat
- System.Func<System.Boolean>
如果应继续动画便会返回 true 的函数。
适用于
Animate(IAnimatable, String, Action<Double>, Double, Double, UInt32, UInt32, Easing, Action<Double,Boolean>, Func<Boolean>)
设置指定参数并启动动画。
public static void Animate (this Xamarin.Forms.IAnimatable self, string name, Action<double> callback, double start, double end, uint rate = 16, uint length = 250, Xamarin.Forms.Easing easing = default, Action<double,bool> finished = default, Func<bool> repeat = default);
static member Animate : Xamarin.Forms.IAnimatable * string * Action<double> * double * double * uint32 * uint32 * Xamarin.Forms.Easing * Action<double, bool> * Func<bool> -> unit
参数
- self
- IAnimatable
将对其运行此方法的对象。
- name
- System.String
动画持续时间内,在其同级和父级动画中应该唯一的动画键。
- callback
- System.Action<System.Double>
使用连续动画值调用的操作。
- start
- System.Double
当前动画中启动动画的部分。
- end
- System.Double
当前动画中停止动画的部分。
- rate
- System.UInt32
各帧之间经过的时间(以毫秒为单位)。
- length
- System.UInt32
执行内插动画操作的毫秒数。
- easing
- Easing
用于动画的切入、切出或进入和退出的缓动函数。
- finished
- System.Action<System.Double,System.Boolean>
动画结束时调用的操作。
- repeat
- System.Func<System.Boolean>
如果应继续动画便会返回 true 的函数。
适用于
Animate<T>(IAnimatable, String, Func<Double,T>, Action<T>, UInt32, UInt32, Easing, Action<T,Boolean>, Func<Boolean>)
设置指定参数并启动动画。
public static void Animate<T> (this Xamarin.Forms.IAnimatable self, string name, Func<double,T> transform, Action<T> callback, uint rate = 16, uint length = 250, Xamarin.Forms.Easing easing = default, Action<T,bool> finished = default, Func<bool> repeat = default);
static member Animate : Xamarin.Forms.IAnimatable * string * Func<double, 'T> * Action<'T> * uint32 * uint32 * Xamarin.Forms.Easing * Action<'T, bool> * Func<bool> -> unit
类型参数
- T
参数
- self
- IAnimatable
将对其运行此方法的对象。
- name
- System.String
动画持续时间内,在其同级和父级动画中应该唯一的动画键。
- transform
- System.Func<System.Double,T>
将动画时间映射到新时间值的函数。
- callback
- System.Action<T>
使用连续动画值调用的操作。
- rate
- System.UInt32
各帧之间经过的时间(以毫秒为单位)。
- length
- System.UInt32
执行内插动画操作的毫秒数。
- easing
- Easing
用于动画的切入、切出或进入和退出的缓动函数。
- finished
- System.Action<T,System.Boolean>
动画结束时调用的操作。
- repeat
- System.Func<System.Boolean>
如果应继续动画便会返回 true 的函数。