Show / Hide Table of Contents

Class ColorKeyFrame

Provides a base class for specific animation key-frame techniques that define an animation segment with a Color target value. Derived classes each provide a different key-frame interpolation method for a Color value that is provided for a ColorAnimationUsingKeyFrames animation.

Inheritance
System.Object
DependencyObject
ColorKeyFrame
DiscreteColorKeyFrame
EasingColorKeyFrame
LinearColorKeyFrame
SplineColorKeyFrame
Implements
IKeyFrame
Inherited Members
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Media.Animation
Assembly: OpenSilver.dll
Syntax
public abstract class ColorKeyFrame : DependencyObject, IDependencyObject, IKeyFrame

Constructors

| Improve this Doc View Source

ColorKeyFrame()

Initializes a new instance of the ColorKeyFrame class.

Declaration
protected ColorKeyFrame()
| Improve this Doc View Source

ColorKeyFrame(Color)

Initializes a new instance of the ColorKeyFrame class that has the specified target Value.

Declaration
protected ColorKeyFrame(Color value)
Parameters
Type Name Description
Color value

The Value of the new ColorKeyFrame instance.

| Improve this Doc View Source

ColorKeyFrame(Color, KeyTime)

Initializes a new instance of the ColorKeyFrame class that has the specified target Value and KeyTime.

Declaration
protected ColorKeyFrame(Color value, KeyTime keyTime)
Parameters
Type Name Description
Color value

The Value of the new ColorKeyFrame instance.

KeyTime keyTime

The KeyTime of the new ColorKeyFrame instance.

Fields

| Improve this Doc View Source

KeyTimeProperty

Identifies the KeyTime dependency property.

Declaration
public static readonly DependencyProperty KeyTimeProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

ValueProperty

Identifies the Value dependency property.

Declaration
public static readonly DependencyProperty ValueProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

KeyTime

Gets or sets the time at which the key frame's target Value.

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 null.

| Improve this Doc View Source

Value

Gets or sets the key frame's target value.

Declaration
public Color Value { get; set; }
Property Value
Type Description
Color

The key frame's target value, which is the value at its specified KeyTime. The default is a Color with an ARGB value of #00000000.

Methods

| Improve this Doc View Source

InterpolateValue(Color, Double)

Returns the interpolated value of a specific key frame at the progress increment provided.

Declaration
public Color InterpolateValue(Color baseValue, double keyFrameProgress)
Parameters
Type Name Description
Color 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
Color

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.

| Improve this Doc View Source

InterpolateValueCore(Color, Double)

Calculates the value of a key frame at the progress increment provided.

Declaration
protected virtual Color InterpolateValueCore(Color baseValue, double keyFrameProgress)
Parameters
Type Name Description
Color 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
Color

The output value of this key frame given the specified base value and progress.

Explicit Interface Implementations

| Improve this Doc View Source

IKeyFrame.Value

Declaration
object IKeyFrame.Value { get; set; }
Returns
Type Description
System.Object

Implements

IKeyFrame

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source