HandoffBehavior HandoffBehavior HandoffBehavior HandoffBehavior Enum

定义

指定新动画如何与已经应用于属性的任何现有动画进行交互。Specifies how new animations interact with any existing ones that are already applied to a property.

public enum class HandoffBehavior
public enum HandoffBehavior
type HandoffBehavior = 
Public Enum HandoffBehavior
继承
HandoffBehaviorHandoffBehaviorHandoffBehaviorHandoffBehavior

字段

Compose Compose Compose Compose 1

通过将新动画追加到组合链的末尾来组合新动画和现有动画。New animations are combined with existing animations by appending the new animations to the end of the composition chain.

SnapshotAndReplace SnapshotAndReplace SnapshotAndReplace SnapshotAndReplace 0

新动画替换它们所应用到的属性上的任何现有动画。New animations replace any existing animations on the properties to which they are applied.

注解

使用撰写将StoryboardAnimationTimelineAnimationClock应用到属性时, 以前与该属性关联Clock的任何对象将继续使用系统资源; 计时系统不会删除时钟都会.When you apply a Storyboard, AnimationTimeline, or AnimationClock to a property by using Compose, any Clock objects previously associated with that property continue to consume system resources; the timing system will not remove the clocks automatically.

为了避免在使用撰写应用大量时钟时出现性能问题, 应在完成后从动画属性中删除组合时钟。To avoid performance issues when you apply a large number of clocks using Compose, you should remove composing clocks from the animated property after they complete. 有几种方法可以删除时钟:There are several ways to remove a clock:

此动画问题主要出现在生存期较长的对象上。This is primarily an issue for animations on objects that have a long lifetime. 当对某个对象进行垃圾回收时,它的时钟也会断开连接并进行垃圾回收。When an object is garbage collected, its clocks will also be disconnected and garbage collected.

有关时钟对象的详细信息, 请参阅动画和计时系统概述For more information about clock objects, see Animation and Timing System Overview.

适用于