Compartir a través de


IXRTimeline::GetBeginTime (Compact 2013)

3/28/2014

This method retrieves the time at which this timeline will begin.

Syntax

virtual HRESULT STDMETHODCALLTYPE GetBeginTime(
    XRTimeSpan* pBeginTime
) = 0;

Parameters

  • pBeginTime
    [out] Pointer to an XRTimeSpan structure that indicates the start time of the time line. This defines the time delay before the animation begins.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

This method is useful for creating timelines that play in sequence. You can stagger play times by increasing the pBeginTime of successive timelines that share the same parent IXRStoryboard.

You can also set this value at run time by calling IXRTimeline::SetBeginTime. The value will apply the next time that animation begins.

Leaving the default null value for pBeginTime has the same effect on an animation as an XRTimeSpan that is explicitly set to 0.

A negative value for pBeginTime causes an IXRTimeline to behave as if it started at some time in the past. For example, when GetBeginTime retrieves a begin-time of -2.5 seconds and IXRTimeline::GetDuration retrieves a duration of 5 seconds, the timeline will start at the halfway point.

The time described by pBeginTime is measured relative to the time of the parent of the timeline. For example, a timeline with a begin time of 5 seconds whose parent has a speed-ratio of 2 actually starts after a 2.5 second delay.

A timeline's own speed ratio setting does not affect its begin time. For example, a timeline with a begin time of 5 seconds, a speed-ratio of 2, and a parent timeline with a speed ratio of 1 starts after a 5 second delay, not a 2.5 second delay. For more information, see IXRTimeline::GetSpeedRatio.

.NET Framework Equivalent

System.Windows.Media.Animation.Timeline.BeginTime

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRTimeline
IXRTimeline::SetBeginTime