Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize
This topic has not yet been rated - Rate this topic

Seconds (TimeSpan)

Silverlight

Gets or sets the number of seconds that a TimeSpan object represents.

value = object.Seconds
object.Seconds = value

Type: Double

The number of seconds that the TimeSpan object represents.

This property is read/write. The default value is 0.

Setting this property is possible only through a type conversion syntax, when you set a property that takes a TimeSpan as an attribute string. You cannot set the Seconds property as a distinct attribute of a TimeSpan in XAML, because it is not possible to create a TimeSpan object element in XAML.

You can set or get the Seconds value in script by using object.property syntax, after you get an existing TimeSpan as a property value. If you set the value on a running animation, the value will apply the next time the same animation is started.

If a property that takes a TimeSpan is not explicitly set (either through scripting or XAML), the value of that property might be null. In this case, scripting for object.Seconds will produce an error because object is null.

The Seconds value is the converted summation of all the possible unit inputs for a TimeSpan. For example, a TimeSpan that is created with an attribute value of "0:01:00.555" will have a Seconds value of 60.555. Only the Seconds property exists for getting the representative value; there are no scripting properties for minutes, days, milliseconds, and so on.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.