UIElement.BeginAnimation Method (DependencyProperty, AnimationTimeline)

Starts an animation for a specified animated property on this element.

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

abstract BeginAnimation : 
        dp:DependencyProperty * 
        animation:AnimationTimeline -> unit  
override BeginAnimation : 
        dp:DependencyProperty * 
        animation:AnimationTimeline -> unit

Parameters

dp
Type: System.Windows.DependencyProperty

The property to animate, which is specified as a dependency property identifier.

animation
Type: System.Windows.Media.Animation.AnimationTimeline

The timeline of the animation to start.

Implements

IAnimatable.BeginAnimation(DependencyProperty, AnimationTimeline)

When you check whether a property is animated, note that the animation will begin and be considered animated when the first frame beyond the non-animated starting point is rendered.

If the BeginTime for animation is a null reference (Nothing in Visual Basic), then any current animations are removed and the current value of the property is held.

If the entire animation value is a null reference (Nothing in Visual Basic), all animations are removed from the property and the property value reverts to its base value. However, the originally associated animation timeline is not stopped. Any other animations assigned to that timeline will continue to run.

The following example creates an animation, assigns it, and then calls BeginAnimation to start it.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft