Animatable::ApplyAnimationClock Method (DependencyProperty, AnimationClock)
Assembly: PresentationCore (in PresentationCore.dll)
public: virtual void ApplyAnimationClock( DependencyProperty^ dp, AnimationClock^ clock ) sealed
- Type: System.Windows::DependencyProperty
The property to animate.
- Type: System.Windows.Media.Animation::AnimationClock
The clock with which to animate the specified property. If clock is nullptr, all animations will be removed from the specified property (but not stopped).
This example shows how to use Clock objects to animate a property.
There are three ways to animate a dependency property:
Storyboard objects and the BeginAnimation method enable you to animate properties without directly creating and distributing clocks (for examples, see How to: Animate a Property by Using a Storyboard and How to: Animate a Property Without Using a Storyboard); clocks are created and distributed for you automatically.
The following example shows how to create an AnimationClock and apply it to two similar properties.