Class AnimationProgressBaseBehavior
- Namespace
- AlohaKit.Animations
- Assembly
- AlohaKit.Animations.dll
The AnimationProgressBaseBehavior class provides the foundation for creating behaviors that animate properties of a visual element based on the progress of an animation.
public abstract class AnimationProgressBaseBehavior : Behavior<VisualElement>, INotifyPropertyChanged
- Inheritance
-
AnimationProgressBaseBehavior
- Implements
- Derived
- Inherited Members
Fields
EasingProperty
Bindable property for the easing function of the animation.
public static readonly BindableProperty EasingProperty
Field Value
MaximumProperty
Bindable property for the maximum progress value of the animation.
public static readonly BindableProperty MaximumProperty
Field Value
MinimumProperty
Bindable property for the minimum progress value of the animation.
public static readonly BindableProperty MinimumProperty
Field Value
ProgressProperty
Bindable property for the current progress of the animation.
public static readonly BindableProperty ProgressProperty
Field Value
TargetPropertyProperty
Bindable property for the target property that will be animated.
public static readonly BindableProperty TargetPropertyProperty
Field Value
Properties
Easing
Gets or sets the easing function applied to the animation.
public EasingType Easing { get; set; }
Property Value
Maximum
Gets or sets the maximum progress value of the animation.
public double Maximum { get; set; }
Property Value
Minimum
Gets or sets the minimum progress value of the animation.
public double Minimum { get; set; }
Property Value
Progress
Gets or sets the current progress of the animation, where the value is a nullable double.
public double? Progress { get; set; }
Property Value
Target
Gets the target visual element to which the behavior is attached.
public VisualElement Target { get; }
Property Value
TargetProperty
Gets or sets the bindable property that will be animated.
public BindableProperty TargetProperty { get; set; }
Property Value
Methods
OnAttachedTo(VisualElement)
Called when the behavior is attached to a visual element.
protected override void OnAttachedTo(VisualElement bindable)
Parameters
bindableVisualElementThe visual element to which the behavior is attached.
OnChanged(BindableObject, object, object)
Called when the value of the Progress property changes.
protected static void OnChanged(BindableObject bindable, object oldValue, object newValue)
Parameters
bindableBindableObjectThe bindable object where the property changed.
oldValueobjectThe old value of the property.
newValueobjectThe new value of the property.
OnDetachingFrom(VisualElement)
Called when the behavior is detached from a visual element.
protected override void OnDetachingFrom(VisualElement bindable)
Parameters
bindableVisualElementThe visual element from which the behavior is detached.
OnUpdate()
Performs the animation update logic. This method must be implemented by derived classes.
protected abstract void OnUpdate()
Update()
Updates the animation based on the current progress and target properties.
protected void Update()