Share via


PlayerAnimationOptimization Enum

Definition

Defines constants that specify how an AnimatedVisualPlayer caches animations when the player is idle.

public enum class PlayerAnimationOptimization
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.XamlContract, 65536)]
enum class PlayerAnimationOptimization
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.XamlContract), 65536)]
public enum PlayerAnimationOptimization
Public Enum PlayerAnimationOptimization
Inheritance
PlayerAnimationOptimization
Attributes

Fields

Name Value Description
Latency 0

The player optimizes animation caching for lower latency.

Resources 1

The player optimizes animation caching for lower resource usage.

Remarks

The values of this enumeration are used by the AnimatedVisualPlayer.AnimationOptimization property.

  • If you set the property to Latency, the AnimatedVisualPlayer will pre-create animations even before PlayAsync is called, and not destroy any when the player is idle.
  • If you set the property to Resources, the AnimatedVisualPlayer will not create animations until PlayAsync is called, and will destroy them when it completes.

If you call Pause, this does not free up all resources of the player. To truly stop the animation, call Stop.

Applies to

See also