DependencyObjectExtensions.CreateColorAnimation Method

Definition

Prepares a Windows.UI.Xaml.Media.Animation.ColorAnimation with the given info.

public static Windows.UI.Xaml.Media.Animation.ColorAnimation CreateColorAnimation (this Windows.UI.Xaml.DependencyObject target, string property, Windows.UI.Color to, Windows.UI.Color? from, TimeSpan? delay, TimeSpan duration, Windows.UI.Xaml.Media.Animation.EasingFunctionBase? easing = default, Windows.UI.Xaml.Media.Animation.RepeatBehavior? repeatBehavior = default, Windows.UI.Xaml.Media.Animation.FillBehavior fillBehavior = Windows.UI.Xaml.Media.Animation.FillBehavior.HoldEnd, bool autoReverse = false);
static member CreateColorAnimation : Windows.UI.Xaml.DependencyObject * string * Windows.UI.Color * Nullable<Windows.UI.Color> * Nullable<TimeSpan> * TimeSpan * Windows.UI.Xaml.Media.Animation.EasingFunctionBase * Nullable<Windows.UI.Xaml.Media.Animation.RepeatBehavior> * Windows.UI.Xaml.Media.Animation.FillBehavior * bool -> Windows.UI.Xaml.Media.Animation.ColorAnimation
<Extension()>
Public Function CreateColorAnimation (target As DependencyObject, property As String, to As Color, from As Nullable(Of Color), delay As Nullable(Of TimeSpan), duration As TimeSpan, Optional easing As EasingFunctionBase = Nothing, Optional repeatBehavior As Nullable(Of RepeatBehavior) = Nothing, Optional fillBehavior As FillBehavior = Windows.UI.Xaml.Media.Animation.FillBehavior.HoldEnd, Optional autoReverse As Boolean = false) As ColorAnimation

Parameters

target
Windows.UI.Xaml.DependencyObject

The target Windows.UI.Xaml.DependencyObject to animate.

property
String

The property to animate inside the target Windows.UI.Xaml.DependencyObject.

to
Color

The final property value.

from
Nullable<Color>

The optional initial property value.

delay
Nullable<TimeSpan>

The optional delay for the animation.

duration
TimeSpan

The duration of the Windows.UI.Xaml.Media.Animation.ColorAnimation.

easing
Windows.UI.Xaml.Media.Animation.EasingFunctionBase

The easing function to use inside the Windows.UI.Xaml.Media.Animation.ColorAnimation.

repeatBehavior
Nullable<RepeatBehavior>

The repeat behavior for the animation (defaults to one iteration).

fillBehavior
Windows.UI.Xaml.Media.Animation.FillBehavior

The behavior to use when the animation reaches the end of its schedule.

autoReverse
Boolean

Indicates whether the animation plays in reverse after each forward iteration.

Returns

Windows.UI.Xaml.Media.Animation.ColorAnimation

A Windows.UI.Xaml.Media.Animation.ColorAnimation instance with the specified parameters.

Applies to