Class SingleAnimation
Animates the value of a System.Single property between two target values using linear interpolation over a specified Duration.
Inherited Members
Namespace: System.Windows.Media.Animation
Assembly: OpenSilver.dll
Syntax
public sealed class SingleAnimation : AnimationTimeline, IDependencyObject
Constructors
| Improve this Doc View SourceSingleAnimation()
Initializes a new instance of the SingleAnimation class.
Declaration
public SingleAnimation()
SingleAnimation(Single, Single, Duration)
Initializes a new instance of the SingleAnimation class that animates from the specified starting value to the specified destination value over the specified duration.
Declaration
public SingleAnimation(float fromValue, float toValue, Duration duration)
Parameters
Type | Name | Description |
---|---|---|
System.Single | fromValue | The starting value of the animation. |
System.Single | toValue | The destination value of the animation. |
Duration | duration | The length of time the animation takes to play from start to finish, once. See the Duration property for more information. |
SingleAnimation(Single, Single, Duration, FillBehavior)
Initializes a new instance of the SingleAnimation class that animates from the specified starting value to the specified destination value over the specified duration and has the specified fill behavior.
Declaration
public SingleAnimation(float fromValue, float toValue, Duration duration, FillBehavior fillBehavior)
Parameters
Type | Name | Description |
---|---|---|
System.Single | fromValue | The starting value of the animation. |
System.Single | toValue | The destination value of the animation. |
Duration | duration | The length of time the animation takes to play from start to finish, once. See the Duration property for more information. |
FillBehavior | fillBehavior | Specifies how the animation behaves when it is not active. |
SingleAnimation(Single, Duration)
Initializes a new instance of the SingleAnimation class that animates to the specified value over the specified duration. The starting value for the animation is the base value of the property being animated or the output from another animation.
Declaration
public SingleAnimation(float toValue, Duration duration)
Parameters
Type | Name | Description |
---|---|---|
System.Single | toValue | The destination value of the animation. |
Duration | duration | The length of time the animation takes to play from start to finish, once. See the Duration property for more information. |
SingleAnimation(Single, Duration, FillBehavior)
Initializes a new instance of the SingleAnimation class that animates to the specified value over the specified duration and has the specified fill behavior. The starting value for the animation is the base value of the property being animated or the output from another animation.
Declaration
public SingleAnimation(float toValue, Duration duration, FillBehavior fillBehavior)
Parameters
Type | Name | Description |
---|---|---|
System.Single | toValue | The destination value of the animation. |
Duration | duration | The length of time the animation takes to play from start to finish, once. See the Duration property for more information. |
FillBehavior | fillBehavior | Specifies how the animation behaves when it is not active. |
Fields
| Improve this Doc View SourceByProperty
Identifies the By dependency property.
Declaration
[NotImplemented]
public static readonly DependencyProperty ByProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
EasingFunctionProperty
Identifies the EasingFunction dependency property.
Declaration
public static readonly DependencyProperty EasingFunctionProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
FromProperty
Identifies the From dependency property.
Declaration
public static readonly DependencyProperty FromProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ToProperty
Identifies the To dependency property.
Declaration
public static readonly DependencyProperty ToProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceBy
Gets or sets the total amount by which the animation changes its starting value.
Declaration
[NotImplemented]
public float? By { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Single> | The total amount by which the animation changes its starting value. The default value is null. |
EasingFunction
Gets or sets the easing function applied to this animation.
Declaration
public IEasingFunction EasingFunction { get; set; }
Property Value
Type | Description |
---|---|
IEasingFunction | The easing function applied to this animation. |
From
Gets or sets the animation's starting value.
Declaration
public float? From { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Single> | The starting value of the animation. The default value is null. |
To
Gets or sets the animation's ending value.
Declaration
public float? To { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Single> | The ending value of the animation. The default value is null. |