Export (0) Print
Expand All

Set the loop duration

You can configure an individual timeline in a storyboard or for a whole storyboard to loop once, more than once, or endlessly. If you do both, the repeat behavior set on individual storyboards will run before the repeat behavior on the whole storyboard.

Caution noteCaution

If you set repeat behavior both for timelines in a storyboard and on the storyboard itself, the looping in the timelines will complete before the looping behavior on the storyboard will run. This means that if you set the looping behavior of a timeline to Forever, the looping behavior of the storyboard will never run.

NoteNote

If you test your storyboard using the playback controls, you will not see the timeline loop. To test the looping behavior, run your application by pressing F5. For more information, see Test a storyboard.

To set the repeat behavior of an individual timeline

  1. Select the storyboard from the Storyboard picker by clicking Open a Storyboard Cc294558.d4531c86-5048-481c-a1ca-29af202d28e7(en-us,Expression.40).png under Objects and Timeline, and then selecting the storyboard.

    NoteNote

    If your storyboard is a part of a style or control template, you will have to open the style or control template to access the storyboard. For more information, see Create or modify a template or Edit a style.

  2. In the objects view, expand the nodes under the object that contains the timeline that you want to loop. For example, in the following timeline, the X and Y child properties of the rectangle object contain the timelines that can be looped.

    An animation timeline that moves a rectangle

    Cc294558.982f031a-74a3-414a-abc2-a0f41a741075(en-us,Expression.40).png
  3. Right-click the object or the shaded time-span bar, and then click Edit Repeat Count. The Edit Repeat dialog box appears.

  4. Do one of the following:

    • If you want to repeat the animation only a specific number of times, enter the number of times to repeat the animation in the Repeat Count text box. The minimum value for looping is 1.

    • If you want the animation to loop infinitely, click Set to Forever Cc294558.da7f68ed-4aa6-461f-a8e9-10ab93e437e0(en-us,Expression.40).png.

  5. Click OK. The shaded time-span bar extends to reflect the new duration of the animation.

To set the repeat behavior of an entire storyboard

  1. Select the storyboard from the Storyboard picker by clicking Open a Storyboard Cc294558.d4531c86-5048-481c-a1ca-29af202d28e7(en-us,Expression.40).png under Objects and Timeline and then selecting the storyboard. The storyboard opens for editing.

    NoteNote

    If your storyboard is a part of a style or control template, you will have to open the style or control template to access the storyboard. For more information, see Create or modify a template or Edit a style.

  2. Open the Properties panel. Notice that the Properties panel displays the properties for whichever object is selected under Objects and Timeline.

  3. Click the name of your storyboard under Objects and Timeline so that the name is highlighted. The Properties panel now displays the properties that you can set for the whole storyboard.

    Storyboard properties appear in the Properties panel when the storyboard name is highlighted under Objects and Timeline

    Cc294558.3a0060a3-5e81-4347-bc01-e6df99012d87(en-us,Expression.40).png
  4. Change the RepeatBehavior property by either selecting a value from the drop-down box or entering a value. You can set the property to Forever, or to any integer value followed by an x to indicate the number of times to repeat the storyboard.

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.
Show:
© 2014 Microsoft