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 2.9.1
Interface of Change<T>
DegreesX : float ux
Specifies the X component of the target Value in degrees
DegreesXY : float2 ux
Specifies the X and Y components of the target Value in degrees
DegreesY : float ux
Specifies the Y component of the target Value in degrees
DegreesZ : float ux
Specifies the Z component of the target Value in degrees
Target : Property<T> uno
The property that we intend to animaite
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.
Duration : double ux
For a continuous track: The duration of the change of 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.
KeyframeInterpolation : KeyframeInterpolation ux
Specifies how the Keyframes are interpolated.
Keyframes : IList of Keyframe ux
Provider : ITrackProvider ux
Weight : double ux
Inherited from Animator
Delay : double ux
Mixer : IMixer uno
MixOp : MixOp ux
How to mix this animator when there are multiple conflicting animators affecting the target.
Inherited from PropertyObject
AddPropertyListener(IPropertyListener) uno
OnPropertyChanged(Selector, IPropertyListener) uno
OnPropertyChanged(Selector) uno
RemovePropertyListener(IPropertyListener) uno
Inherited from object
Equals(object) : bool uno
GetHashCode : int uno
GetType : Type uno
ToString : string uno
Attached UX Attributes
GlobalKey (attached by Resource) : string ux
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.