Partager via


XRDuration (Compact 2013)

3/28/2014

This structure defines how long a timeline will play one time.

Syntax

struct XRDuration{
  enum _DurationType{
        DurationType_Automatic,
        DurationType_TimeSpan
  };

    XRTimeSpan TimeSpan;
  _DurationType DurationType;
};

Members

  • DurationType
    Indicates the duration type as follows:

    Element

    Description

    DurationType_Automatic

    The duration is determined automatically.

    DurationType_TimeSpan

    The duration is contained in the TimeSpan member.

  • TimeSpan
    An XRTimeSpan value that indicates the duration.

Remarks

You can set XRDuration on a storyboard or animation by using IXRTimeline::SetDuration.

If you use DurationType_Automatic for a storyboard, the timeline continues until the last child animation ends. If you use DurationType_Automatic for an animation, the time span is 1 second. You can use this setting during debugging to verify that the animation starts.

If you want an animation to repeat continuously, use IXRTimeline::SetRepeatBehavior.

.NET Framework Equivalent

System.Windows.Duration

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

XAML for Windows Embedded Structures
IXRTimeline