DelegateAnimatablePropertyT Class |
Namespace: DigitalRune.Animation
public class DelegateAnimatableProperty<T> : IAnimatableProperty<T>, IAnimatableProperty
The DelegateAnimatablePropertyT type exposes the following members.
Name | Description | |
---|---|---|
DelegateAnimatablePropertyT |
Initializes a new instance of the DelegateAnimatablePropertyT class.
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
GetValue |
Gets or sets the callback that reads the property value.
| |
SetValue |
Gets or sets the callback that writes the property value.
|
Name | Description | |
---|---|---|
IAnimatablePropertyAnimationValue |
Gets the animation value.
| |
IAnimatablePropertyTAnimationValue |
Gets or sets the animation value.
| |
IAnimatablePropertyBaseValue |
Not implemented.
| |
IAnimatablePropertyTBaseValue |
Not implemented.
| |
IAnimatablePropertyHasBaseValue |
Gets a value indicating whether this property has a base value.
| |
IAnimatablePropertyIsAnimated |
Gets or sets a value indicating whether this property is animated by the animation system.
|
The animation system can only animate objects of type IAnimatablePropertyT. Normal CLR field or properties do not implement this interface and can therefore not be animated directly. The DelegateAnimatablePropertyT wraps an existing field or property and makes it accessible for the animation system.
The DelegateAnimatablePropertyT requires two callbacks: One that reads the value (see GetValue) and one that writes the value (SetValue). The callbacks can read/write any existing field or property.
This type of IAnimatableProperty does not have a BaseValue, which means that it does not support additive animations or certain types of from/to/by-animations. Use AnimatablePropertyT instead of DelegateAnimatablePropertyT if this functionality is required.
Note: The animation system does not keep animatable properties alive. It automatically removes animations if the IAnimatablePropertyT is no longer referenced by another object. This means, the created IAnimatablePropertyT needs to be kept alive as long as the property should be animated.