Files
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.7 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Interactively Control a Clock 03/30/2017
csharp
vb
controlling clocks interactively [WPF]
clocks [WPF], controlling interactively
d0b520e0-2f18-4cef-977f-2909e709548a

How to: Interactively Control a Clock

A xref:System.Windows.Media.Animation.Clock object's xref:System.Windows.Media.Animation.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.

Note

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 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.

Example

[!code-csharptimingbehaviors_procedural_snip#GraphicsMMClockControllerExample] [!code-vbtimingbehaviors_procedural_snip#GraphicsMMClockControllerExample]

See also