Groups several animations together
This allows for a nice way of grouping several animations together and separating them from the interaction logic.
Timeline can be played by animating its
TargetProgress property between 0 and 1.
Timelineitself is not intended for grouping multiple animators to create keyframe animations. To achieve this, you can add Keyframes to the animators themselves.
<Timeline> <Change rect.Opacity="1" Delay="0.0" Duration="0.5" /> <Change rect.Opacity="0" Delay="0.5" Duration="0.5" /> </Timeline>
<Timeline> <Change Target="rect.Opacity"> <Keyframe Value="1" Time="0.5" /> <Keyframe Value="0" Time="1.0" /> </Change> </Timeline>
Here is an example of how we can use a timeline to animate several properties on a rectangle (its width and color), and then play between the start and end of this
Timeline by clicking two buttons.
<StackPanel> <Rectangle ux:Name="rect" Height="40" Width="100%"> <SolidColor ux:Name="color" Color="#f00" /> </Rectangle> <Grid ColumnCount="2"> <Button Text="Red"> <Clicked> <Set timeline.TargetProgress="0" /> </Clicked> </Button> <Button Text="Green"> <Clicked> <Set timeline.TargetProgress="1" /> </Clicked> </Button> </Grid> <Timeline ux:Name="timeline"> <Change Target="rect.Width"> <Keyframe Value="10" Time="0.3"/> <Keyframe Value="100" Time="0.6"/> </Change> <Change color.Color="#0f0" Duration="0.3" Delay="0.3"/> </Timeline> </StackPanel>
- Fuse.Triggers 1.4.0
Interface of Timeline
InitialProgress : double ux
Progress which the Timeline should start playing from
Makes triggers active when progress is 0 if
Stops the playback at the current progress. Unlike
Stop this does not adjust the TargetProgress, a
Resume can continue playing to the previous target.
Pauses playback at the current progress. Call resume to continue playing.
Plays to a particular progress in the Timeline. This plays from the current progress to the new target progress.
Current progress of the timeline
Pulses the Timeline (plays to end and back to start).
Pulses the Timeline backward (seeks to end then plays backward to start)
Pulses the Timeline forward (plays to the end and deactivates).
Resumes playing to the TargetProgress.
Resumes playback from the current progress to the target progress. Call this after a pause to resume playback.
Seeks to a given location (jumps there without playing the intervening animation).
Stops playback. This sets the target progress to the current location such that resume will not keep playing.
TargetProgress : double ux
Progress at which the Timeline ends
Inherited from Trigger
A list of actions that execute with the trigger. These may react on simple direction changes, or at specific time offsets.
Bypass : TriggerBypassMode ux
CrossFadeDuration : double ux
If there is a transition between forward/backward playback and two timeilnes are being used (implicit or explicit) this specifies the cross-fade time.
HasActions : bool uno
HasAnimators : bool uno
HasBackwardAnimation : bool uno
true if there is an explicit backward animation.
Play the trigger from where it currently is to the end.
Indicates the trigger is bound to the layout of a visual. This will keep the trigger in Bypass mode until after the first layout of the element is obtained. This is required since layout does not happen in the same root grouping/update phase as the creation of the element, yet not having a layout should qualify as part of the rooting period.
StretchDuration : double ux
Stretches the duration of the animation to fill up this period of time.
TimeMultiplier : double ux
Specifies a multiplier to the elapsed time for animation playback.
Inherited from NodeGroupBase
FindTemplate(string) : Template uno
Nodes : IList of Node ux
Nodes to add to the Parent when this trigger is any non-deactivated state (Progress > 0)
Inherited from Node
Bindings : IList of Binding ux
The list of bindings belonging to this node.
ContextParent : Node uno
The context parent is the semantic parent of this node. It is where non-UI structure should be resolved, like looking for the DataContext, a Navigation, or other semantic item.
FindByType<T> : T uno
Finds the first node with a given name that satisfies the given acceptor. The serach algorithm works as follows: Nodes in the subtree are matched first, then it matches the nodes in the subtrees ofthe ancestor nodes by turn all the way to the root. If no matching node is found, the function returns null.
GetFirstData : object uno
GetNearestAncestorOfType<T> : T uno
IsRootingCompleted : bool uno
Whether rooting for this node is completed. Returns false if unrooting has started.
IsRootingStarted : bool uno
Whether rooting of this node has started. Note that even if this property returns true, rooting may not yet be completed for the node. See also IsRootingCompleted.
Run-time name of the node. This property is automatically set using the ux:Name attribute.
NextSibling<T> : T uno
Returns the next sibling node of the given type.
The parent Visual of this node. Will return null if the node is not rooted.
PreviousSibling<T> : T uno
Returns the next sibling node of the given type.
Properties : Properties uno
A linked list holding data for extrinsic properties.
Remove(Binding) : bool uno
SubtreeToString : string uno
Inherited from PropertyObject
Inherited from object
Equals(object) : bool uno
GetHashCode : int uno
Attached UX Attributes
Interface for objects that can have a script engine representation