ContentElement.BeginAnimation 方法

定义

为此元素上指定的动画属性启动动画。

重载

名称 说明
BeginAnimation(DependencyProperty, AnimationTimeline)

为此元素上指定的动画属性启动动画。

BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)

为此元素上指定动画属性启动特定动画,并指定如果该属性已有正在运行的动画,则指定会发生什么情况。

BeginAnimation(DependencyProperty, AnimationTimeline)

为此元素上指定的动画属性启动动画。

public:
 virtual void BeginAnimation(System::Windows::DependencyProperty ^ dp, System::Windows::Media::Animation::AnimationTimeline ^ animation);
public void BeginAnimation(System.Windows.DependencyProperty dp, System.Windows.Media.Animation.AnimationTimeline animation);
abstract member BeginAnimation : System.Windows.DependencyProperty * System.Windows.Media.Animation.AnimationTimeline -> unit
override this.BeginAnimation : System.Windows.DependencyProperty * System.Windows.Media.Animation.AnimationTimeline -> unit
Public Sub BeginAnimation (dp As DependencyProperty, animation As AnimationTimeline)

参数

dp
DependencyProperty

要进行动画处理的属性,该属性被指定为依赖属性标识符。

animation
AnimationTimeline

要启动的动画的时间线。

实现

注解

检查属性是否为动画时,请注意,当呈现非动画起点以外的第一帧时,动画将开始并被视为动画。

如果为 <a0/>,则删除任何当前动画,并保留该属性的当前值。

如果整个 animation 值为 null,则会从属性中删除所有动画,属性值将还原为其基值。 但是,最初关联的动画时间线不会停止。 分配给该时间线的任何其他动画将继续运行。

适用于

BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)

为此元素上指定动画属性启动特定动画,并指定如果该属性已有正在运行的动画,则指定会发生什么情况。

public:
 virtual void BeginAnimation(System::Windows::DependencyProperty ^ dp, System::Windows::Media::Animation::AnimationTimeline ^ animation, System::Windows::Media::Animation::HandoffBehavior handoffBehavior);
public void BeginAnimation(System.Windows.DependencyProperty dp, System.Windows.Media.Animation.AnimationTimeline animation, System.Windows.Media.Animation.HandoffBehavior handoffBehavior);
abstract member BeginAnimation : System.Windows.DependencyProperty * System.Windows.Media.Animation.AnimationTimeline * System.Windows.Media.Animation.HandoffBehavior -> unit
override this.BeginAnimation : System.Windows.DependencyProperty * System.Windows.Media.Animation.AnimationTimeline * System.Windows.Media.Animation.HandoffBehavior -> unit
Public Sub BeginAnimation (dp As DependencyProperty, animation As AnimationTimeline, handoffBehavior As HandoffBehavior)

参数

dp
DependencyProperty

要进行动画处理的属性,该属性被指定为依赖属性标识符。

animation
AnimationTimeline

要应用的动画的时间线。

handoffBehavior
HandoffBehavior

枚举的值,该值指定新动画如何与任何已影响属性值的当前(正在运行)动画进行交互。

实现

注解

检查属性是否为动画时,请注意,当呈现非动画起点以外的第一帧时,动画将开始并被视为动画。

如果为 <a0/>,则删除任何当前动画,并保留该属性的当前值。

如果整个 animation 值为 null,则会从属性中删除所有动画,属性值将还原为其基值。 但是,最初关联的动画时间线不会停止。 分配给该时间线的任何其他动画将继续运行。

适用于