ClockController::Seek Method (TimeSpan, TimeSeekOrigin)

 

Seeks the target Clock by the specified amount when the next tick occurs. If the target clock is stopped, seeking makes it active again.

Namespace:   System.Windows.Media.Animation
Assembly:  PresentationCore (in PresentationCore.dll)

public:
void Seek(
	TimeSpan offset,
	TimeSeekOrigin origin
)

Parameters

offset
Type: System::TimeSpan

The seek offset, measured in the target clock's time. This offset is relative to the clock's BeginTime or Duration, depending on the value of origin.

origin
Type: System.Windows.Media.Animation::TimeSeekOrigin

A value that indicates whether the specified offset is relative to the target clock's BeginTime or Duration.

Seek operations do not take the SpeedRatio or SlipBehavior settings of this clock's timeline into account: the clock is treated as though its timeline has a SpeedRatio of 1 and no SlipBehavior.

This method changes the clock's CurrentState to Active. This method has no effect on the timing tree until the next time a tick is processed. As a side-effect, the appropriate events also will not be raised until then.

Seeking a storyboard triggers the CurrentGlobalSpeedInvalidated and CurrentStateInvalidated events.

If the target clock has children, their current time is updated accordingly.

The following example shows how to seek using a ClockController.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: