krutort.blogg.se

How to change the clock
How to change the clock













This statement triggers a CurrentGlobalSpeedInvalidated

how to change the clock

Private void speedRatioButton_Clicked(object sender, RoutedEventArgs e) New EventHandler(m圜ontrollableClock_currentGlobalSpeedInvalidated) M圜ontrollableClock.CurrentGlobalSpeedInvalidated += Display the clock's global speed information.ĬurrentGlobalSpeedTextBlock = new TextBlock() SpeedRatioButton.Click += new RoutedEventHandler(speedRatioButton_Clicked) SpeedRatioButton.Content = "Apply Speed Ratio" Create a button to apply SpeedRatio changes. New TextChangedEventHandler(seekAmountTextBox_TextChanged) SpeedRatioSettingTextBox.VerticalAlignment = VerticalAlignment.Top SpeedRatioSettingTextBox = new TextBox() Create a text box so that the user can SpeedRatioLabel.Content = "Speed Ratio:" SpeedRatioDetailsPanel.Orientation = Orientation.Horizontal SpeedRatioDetailsPanel.Margin = new Thickness(0,20,0,20) StackPanel speedRatioDetailsPanel = new StackPanel() interactively control the SpeedRatio of the clock.

how to change the clock

Create some controls the enable the user to Rectangle.WidthProperty, m圜ontrollableClock) Apply the clock to the rectangle's Width property. M圜ontrollableClock = widthAnimation.CreateClock() widthAnimation.RepeatBehavior = RepeatBehavior.Forever Rectangle animatedRectangle = new Rectangle() Public ClockControllerSpeedRatioExample() Private TextBlock currentGlobalSpeedTextBlock Private TextBox speedRatioSettingTextBox Private AnimationClock m圜ontrollableClock Public class ClockControllerSpeedRatioExample : Page

how to change the clock

This example shows how to interactively control The CurrentGlobalSpeedInvalidated event and the clock's CurrentGlobalSpeed property are used to display the clock's current global speed each time its interactive SpeedRatio is changed. In the following example, a ClockController is used to interactively modify the SpeedRatio of a clock. How to: Change the Speed of a Clock Without Changing the Speed of Its TimelineĪ ClockController object's SpeedRatio property enables you to change the speed of a Clock without altering the SpeedRatio of the clock's Timeline.















How to change the clock