共用方式為


WinJS.UI.enableAnimations function

Enables all Animation Library and ListView animations. Calling this function does not guarantee that the animations will be enabled, as the determination is made based on several factors.

Syntax

WinJS.UI.enableAnimations();

Parameters

This method has no parameters.

Return value

This function does not return a value.

Remarks

The enableAnimations and disableAnimations functions allow apps to keep their custom animations in sync with the system accessibility setting used by the Animations Library. (The system accessibility setting is the "Turn off all unneccesary animations (when possible)" option found in the Ease of Access Center in Control Panel. It can be retrieved through the Windows.UI.ViewManagement.UISettings.animationsEnabled property.) These functions also allow apps that run in the web context to enable or disable animations to respect the system accessibility setting. Normally this is done automatically, but the system accessibility setting cannot be accessed by the web context, so the app must enable or disable animations manually.

See isAnimationEnabled for a full discussion of how the enableAnimations function is used with the system accessibility setting to determine whether animations should be enabled or disabled.

Requirements

Minimum WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

disableAnimations

isAnimationEnabled

HTML animation library sample

HTML ListView essentials sample