Export (0) Print
Expand All

ClockController.Stop Method

Stops the target Clock.

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

member Stop : unit -> unit

This method changes the target clock's CurrentState to Stopped.

A Stopped clock can be restarted by using the Begin, Seek, or SeekAlignedToLastTick method.

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.

Stopping a clock triggers the CurrentGlobalSpeedInvalidated and CurrentStateInvalidated events, but not the Completed event.

A Clock object's ClockController property enables you to interactively start, pause, resume, seek, advance the clock to its fill period, and stop the clock. Only the root clock of a timing tree can be interactively controlled.

NoteNote

There are other ways to interactively control animations that don't require you to work directly with clocks: you can also use Storyboards. Storyboards are supported in both markup and code. For an example, see How to: Animate a Property by Using a Storyboard or the Animation Overview.

In the following example, several buttons are used to interactively control an animation clock.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft