Table of Contents

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

BindableProperty

MaximumProperty

Bindable property for the maximum progress value of the animation.

public static readonly BindableProperty MaximumProperty

Field Value

BindableProperty

MinimumProperty

Bindable property for the minimum progress value of the animation.

public static readonly BindableProperty MinimumProperty

Field Value

BindableProperty

ProgressProperty

Bindable property for the current progress of the animation.

public static readonly BindableProperty ProgressProperty

Field Value

BindableProperty

TargetPropertyProperty

Bindable property for the target property that will be animated.

public static readonly BindableProperty TargetPropertyProperty

Field Value

BindableProperty

Properties

Easing

Gets or sets the easing function applied to the animation.

public EasingType Easing { get; set; }

Property Value

EasingType

Maximum

Gets or sets the maximum progress value of the animation.

public double Maximum { get; set; }

Property Value

double

Minimum

Gets or sets the minimum progress value of the animation.

public double Minimum { get; set; }

Property Value

double

Progress

Gets or sets the current progress of the animation, where the value is a nullable double.

public double? Progress { get; set; }

Property Value

double?

Target

Gets the target visual element to which the behavior is attached.

public VisualElement Target { get; }

Property Value

VisualElement

TargetProperty

Gets or sets the bindable property that will be animated.

public BindableProperty TargetProperty { get; set; }

Property Value

BindableProperty

Methods

OnAttachedTo(VisualElement)

Called when the behavior is attached to a visual element.

protected override void OnAttachedTo(VisualElement bindable)

Parameters

bindable VisualElement

The 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

bindable BindableObject

The bindable object where the property changed.

oldValue object

The old value of the property.

newValue object

The new value of the property.

OnDetachingFrom(VisualElement)

Called when the behavior is detached from a visual element.

protected override void OnDetachingFrom(VisualElement bindable)

Parameters

bindable VisualElement

The 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()