Partager via


BeginTime

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the time at which this Timeline should begin.

<object BeginTime="TimeSpan"  .../>
value = object.BeginTime
object.BeginTime = value

Property Value

Type: TimeSpan

The start time of the time line.

This property is read/write. The default value is null, which corresponds to a value of 0.

Managed Equivalent

BeginTime

Remarks

See TimeSpan for the string format that you use to specify a BeginTime value. Creating a TimeSpan in XAML is possible only through a type conversion syntax when setting a property that takes a TimeSpan as an attribute string.

You can set the BeginTime value in script by using the object.BeginTime="durationstring" syntax. You must use a quoted string, which then uses the same type conversion behavior as the XAML attribute syntax. You can set the value on a running animation, and the value will apply the next time that animation is started. You can get the BeginTime value in script by using value=object.BeginTime syntax. However, if the BeginTime for an animation is not explicitly set (either through scripting or in XAML), the value of object.BeginTime will be null. A null value for BeginTime has the same implied effect on an animation as a TimeSpan that is explicitly set to "0".