ClockController::SeekAlignedToLastTick Method (TimeSpan, TimeSeekOrigin)
Seeks the target Clock by the specified amount immediately. If the target clock is stopped, seeking makes it active again.
Assembly: PresentationCore (in PresentationCore.dll)
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.
SeekAlignedToLastTick aligns the seeked time of the clock with the last clock tick. Values are immediately updated to reflect the changes due to SeekAlignedToLastTick, even though the screen will not reflect these changes until the screen updates.
If the target clock has children, their current time is updated accordingly.
This method changes the clock's CurrentState to Active.
Seeking a storyboard triggers the CurrentGlobalSpeedInvalidated and CurrentStateInvalidated events.
The following example demonstrates both the Seek and SeekAlignedToLastTick methods of a ClockController.
Available since 3.0