Change<T> Class

Temporarily changes the value of a property while its containing trigger is active. To permanently change a value, use the Set animator.

Tip: You can specify Units with Value as long as the unit matches the original unit of the Target.

Because the task of setting a target property and value is so common, UX has a special syntax for this. Instead of

<Change Target="target.Property" Value="Value"/>

one can do the following:

<Change target.Property="Value"/>

Example

As with other animators, you can also specify a Duration:

<Panel ux:Name="panel" Color="#000">
    <WhilePressed>
        <Change panel.Color="#fff" Duration="0.5" />
    </WhilePressed>
</Panel>

If the value is continuous this will result in a continously interpolated change in value. If the value cannot be continuously animated, the value will change discretely.

Location

Namespace
Fuse.Animations
Package
Fuse.Animations 1.4.0

Interface of Change<T>

Value : T ux

Specifies the target value to change to.

X : float ux

Specifies the X component of the target Value

XY : float2 ux

Specifies the X and Y components of the target Value

Y : float ux

Specifies the Y component of the target Value

Z : float ux

Specifies the Z component of the target Value

Inherited from TrackAnimator

DelayBack : double ux

How long to wait, from the end of the backward timeline, before the animator starts changing the value.

DurationBack : double ux

For a continuous track: The duraciton of the change of the value in the backward timeline.

Easing : Easing ux

For a continuous track: This specifies the transition easing between a source and target value.

EasingBack : Easing ux

For a continuous track: This specified the easing for the backward timeline.

Weight : double ux

Allows the value set by this animator to be increased or decreased in significance (the default is 1).

Inherited from Animator

Delay : double ux

Seconds from the start of the trigger until this animator should play.

MixOp : MixOp ux

How to mix this animator when there are multiple conflicting animators affecting the target.

Inherited from PropertyObject

Inherited from object

Attached UX Attributes

GlobalKey (attached by Resource) : string ux

The ux:Global attribute creates a global resource that is accessible everywhere in UX markup.

Remarks

Animating layout properties

While animating layout properties such as Width, Height or Margin is possible, it can lead to huge performance issues. This is because the app has to recalculate its entire layout for each frame of the animation.

A much faster alternative is to use LayoutAnimation, as it only needs to recalculate layout for the children of the element being animated. Take a look at the LayoutAnimation docs for more info.