Class StringKeyFrame
Defines an animation segment with its own target value and interpolation method for a StringAnimationUsingKeyFrames.
Implements
Inherited Members
Namespace: System.Windows.Media.Animation
Assembly: OpenSilver.dll
Syntax
public abstract class StringKeyFrame : DependencyObject, IDependencyObject, IKeyFrame
Constructors
| Improve this Doc View SourceStringKeyFrame()
Initializes a new instance of the StringKeyFrame class.
Declaration
protected StringKeyFrame()
StringKeyFrame(String)
Initializes a new instance of the StringKeyFrame class that has the specified target Value.
Declaration
protected StringKeyFrame(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The Value of the new StringKeyFrame instance. |
StringKeyFrame(String, KeyTime)
Initializes a new instance of the StringKeyFrame class that has the specified target Value and KeyTime.
Declaration
protected StringKeyFrame(string value, KeyTime keyTime)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The Value of the new StringKeyFrame instance. |
KeyTime | keyTime | The KeyTime of the new StringKeyFrame instance. |
Fields
| Improve this Doc View SourceKeyTimeProperty
Identifies the KeyTime dependency property.
Declaration
public static readonly DependencyProperty KeyTimeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ValueProperty
Identifies the Value dependency property.
Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceKeyTime
Gets or sets the time at which the key frame's target Value should be reached.
Declaration
public KeyTime KeyTime { get; set; }
Property Value
Type | Description |
---|---|
KeyTime | The time at which the key frame's current value should be equal to its Value property. The default is Uniform. |
Value
Gets or sets the key frame's target value.
Declaration
public string Value { get; set; }
Property Value
Type | Description |
---|---|
System.String | The key frame's target value, which is the value of this key frame at its specified KeyTime. The default value is 0. |
Methods
| Improve this Doc View SourceInterpolateValue(String, Double)
Returns the interpolated value of a specific key frame at the progress increment provided.
Declaration
public string InterpolateValue(string baseValue, double keyFrameProgress)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseValue | The value to animate from. |
System.Double | keyFrameProgress | A value between 0.0 and 1.0, inclusive, that specifies the percentage of time that has elapsed for this key frame. |
Returns
Type | Description |
---|---|
System.String | The output value of this key frame given the specified base value and progress. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Occurs if keyFrameProgress is not between 0.0 and 1.0, inclusive. |
InterpolateValueCore(String, Double)
When overridden in a derived class, calculates the value of a key frame at the progress increment provided.
Declaration
protected virtual string InterpolateValueCore(string baseValue, double keyFrameProgress)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseValue | The value to animate from; typically the value of the previous key frame. |
System.Double | keyFrameProgress | A value between 0.0 and 1.0, inclusive, that specifies the percentage of time that has elapsed for this key frame. |
Returns
Type | Description |
---|---|
System.String | The output value of this key frame given the specified base value and progress. |
Explicit Interface Implementations
| Improve this Doc View SourceIKeyFrame.Value
Declaration
object IKeyFrame.Value { get; set; }
Returns
Type | Description |
---|---|
System.Object |