how to make DispatcherTimer events smoother in WPF?
问题 In my WPF application, the user presses a button to start a 3D model rotating smoothly, and lets up on the button to stop the rotation. To do this, I create a DispatcherTimer: DispatcherTimer timer = new DispatcherTimer(); timer.Tick += new EventHandler( timer_Tick ); timer.Interval = new TimeSpan( 0, 0, 0, 0, 30 ); And when the button is pressed I call timer.Start() and when the button is let up I call timer.Stop() . The timer_Tick function changes the rotation of the model: void timer_Tick(