Skip to main content

PlaybackBehavior Enum

Definition

Assembly:Avalonia.Base
Package:Avalonia

Determines whether an animation pauses when its target control is not effectively visible (see Avalonia.Visual.IsEffectivelyVisible).

public enum PlaybackBehavior

Inheritance: Enum -> PlaybackBehavior

Fields

NameDescription
AlwaysThe animation always plays regardless of the control's effective visibility state.
AutoThe system decides based on context. Manually started animations (via Avalonia.Animation.Animation.RunAsync(Avalonia.Animation.Animatable,System.Threading.CancellationToken)) and animations that target Avalonia.Visual.IsVisibleProperty always play. Style-applied animations pause when the control is not effectively visible (see Avalonia.Visual.IsEffectivelyVisible).
OnlyIfVisibleThe animation pauses when the control is not effectively visible (see Avalonia.Visual.IsEffectivelyVisible).

Always Field

The animation always plays regardless of the control's effective visibility state.

public Avalonia.Animation.PlaybackBehavior Always

Auto Field

The system decides based on context. Manually started animations (via Avalonia.Animation.Animation.RunAsync(Avalonia.Animation.Animatable,System.Threading.CancellationToken)) and animations that target Avalonia.Visual.IsVisibleProperty always play. Style-applied animations pause when the control is not effectively visible (see Avalonia.Visual.IsEffectivelyVisible).

public Avalonia.Animation.PlaybackBehavior Auto

OnlyIfVisible Field

The animation pauses when the control is not effectively visible (see Avalonia.Visual.IsEffectivelyVisible).

public Avalonia.Animation.PlaybackBehavior OnlyIfVisible