Skip to main content
AnimatableBeginAnimation Method

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Applies an animation to the specified DependencyProperty. The animation is started when the next frame is rendered. If the specified property is already animated, the SnapshotAndReplace handoff behavior is used.

Namespace:   System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)

public void BeginAnimation(
	DependencyProperty dp,
	AnimationTimeline animation
virtual void BeginAnimation(
	DependencyProperty^ dp,
	AnimationTimeline^ animation
) sealed
abstract BeginAnimation : 
        dp:DependencyProperty *
        animation:AnimationTimeline -> unit
override BeginAnimation : 
        dp:DependencyProperty *
        animation:AnimationTimeline -> unit
Public Sub BeginAnimation (
	dp As DependencyProperty,
	animation As AnimationTimeline



The property to animate.


The animation used to animate the specified property.

If the animation's is null, any current animations will be removed and the current value of the property will be held.

If animation is null, all animations will be removed from the property and the property value will revert back to its base value.

If the animation has a that is greater than zero, the animation begins after that amount of time has elapsed from the time the next frame is rendered.

.NET Framework
Available since 3.0
Return to top