Class LayerPropertyPreview<T>
Represents a container for a preview value of a LayerProperty<T> that can be used to update and discard a temporary value.
public sealed class LayerPropertyPreview<T> : IDisposable
Type Parameters
TThe value type of the layer property.
- Inheritance
-
objectLayerPropertyPreview<T>
- Implements
Constructors
LayerPropertyPreview(LayerProperty<T>, TimeSpan)
Creates a new instance of the LayerPropertyPreview<T> class.
public LayerPropertyPreview(LayerProperty<T> layerProperty, TimeSpan time)
Parameters
layerPropertyLayerProperty<T>The layer property to apply the preview value to.
timeTimeSpanThe time in the timeline at which the preview is applied.
Properties
OriginalKeyframe
Gets the original keyframe of the property at the time the preview was created.
public LayerPropertyKeyframe<T>? OriginalKeyframe { get; }
Property Value
OriginalValue
Gets the original value of the property at the time the preview was created.
public T OriginalValue { get; }
Property Value
- T
PreviewKeyframe
Gets the keyframe that was created to preview the value.
public LayerPropertyKeyframe<T>? PreviewKeyframe { get; }
Property Value
PreviewValue
Gets the preview value.
public T? PreviewValue { get; }
Property Value
- T
Property
Gets the property this preview applies to.
public LayerProperty<T> Property { get; }
Property Value
Time
Gets the time in the timeline at which the preview is applied.
public TimeSpan Time { get; }
Property Value
Methods
DiscardPreview()
Discard the preview value and restores the original state of the property. The returned boolean can be used to determine whether the preview value was different from the original value.
public bool DiscardPreview()
Returns
Dispose()
Discard the preview value and restores the original state of the property. The returned boolean can be used to determine whether the preview value was different from the original value.
public void Dispose()
Preview(T)
Updates the layer property to the given value, keeping track of the original state of the
property.
public void Preview(T value)
Parameters
valueTThe value to preview.