Files
docs-desktop/dotnet-desktop-guide/framework/wpf/graphics-multimedia/change-the-speed-of-a-clock.md
T
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.8 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Change the Speed of a Clock Without Changing the Speed of Its Timeline 03/30/2017
csharp
vb
speed of Clock [WPF], changing
clocks [WPF], changing speed of
72f36dd0-f085-445d-8589-19a83fe74f5e

How to: Change the Speed of a Clock Without Changing the Speed of Its Timeline

A xref:System.Windows.Media.Animation.ClockController object's xref:System.Windows.Media.Animation.ClockController.SpeedRatio%2A property enables you to change the speed of a xref:System.Windows.Media.Animation.Clock without altering the xref:System.Windows.Media.Animation.Timeline.SpeedRatio%2A of the clock's xref:System.Windows.Media.Animation.Timeline. In the following example, a xref:System.Windows.Media.Animation.ClockController is used to interactively modify the xref:System.Windows.Media.Animation.ClockController.SpeedRatio%2A of a clock. The xref:System.Windows.Media.Animation.Clock.CurrentGlobalSpeedInvalidated event and the clock's xref:System.Windows.Media.Animation.Clock.CurrentGlobalSpeed%2A property are used to display the clock's current global speed each time its interactive xref:System.Windows.Media.Animation.ClockController.SpeedRatio%2A is changed.

Example

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