Storyboard.GetCurrentTime Method

Definition

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

Overloads

GetCurrentTime()

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

GetCurrentTime(FrameworkContentElement)

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

GetCurrentTime(FrameworkElement)

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

GetCurrentTime()

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

public:
 TimeSpan GetCurrentTime();
public TimeSpan GetCurrentTime ();
member this.GetCurrentTime : unit -> TimeSpan
Public Function GetCurrentTime () As TimeSpan

Returns

null if this storyboard's clock is Stopped; otherwise, the current time of the storyboard's clock.

Remarks

To use this method to retrieve information about a storyboard's clock, the storyboard must be controllable. To make a storyboard controllable in code, you must use the appropriate overload of the storyboard's Begin method and specify true to make it controllable. For an example, see How to: Control a Storyboard After It Starts.

See also

Applies to

GetCurrentTime(FrameworkContentElement)

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

public:
 Nullable<TimeSpan> GetCurrentTime(System::Windows::FrameworkContentElement ^ containingObject);
public TimeSpan? GetCurrentTime (System.Windows.FrameworkContentElement containingObject);
member this.GetCurrentTime : System.Windows.FrameworkContentElement -> Nullable<TimeSpan>
Public Function GetCurrentTime (containingObject As FrameworkContentElement) As Nullable(Of TimeSpan)

Parameters

containingObject
FrameworkContentElement

The object specified when the Begin(FrameworkContentElement, Boolean) method was called. This object contains the Clock objects that were created for this storyboard and its children.

Returns

null if this storyboard's clock is Stopped; otherwise, the current time of the storyboard's clock.

Remarks

To use this method to retrieve information about a storyboard's clock, the storyboard must be controllable. To make a storyboard controllable in code, you must use the appropriate overload of the storyboard's Begin method and specify true to make it controllable. For an example, see How to: Control a Storyboard After It Starts.

See also

Applies to

GetCurrentTime(FrameworkElement)

Retrieves the CurrentTime of the Clock that was created for this Storyboard.

public:
 Nullable<TimeSpan> GetCurrentTime(System::Windows::FrameworkElement ^ containingObject);
public TimeSpan? GetCurrentTime (System.Windows.FrameworkElement containingObject);
member this.GetCurrentTime : System.Windows.FrameworkElement -> Nullable<TimeSpan>
Public Function GetCurrentTime (containingObject As FrameworkElement) As Nullable(Of TimeSpan)

Parameters

containingObject
FrameworkElement

The object specified when the Begin(FrameworkElement, Boolean) method was called. This object contains the Clock objects that were created for this storyboard and its children.

Returns

null if this storyboard's clock is Stopped; otherwise, the current time of the storyboard's clock.

Remarks

To use this method to retrieve information about a storyboard's clock, the storyboard must be controllable. To make a storyboard controllable in code, you must use the appropriate overload of the storyboard's Begin method and specify true to make it controllable. For an example, see How to: Control a Storyboard After It Starts.

See also

Applies to