public void StopRotateAnim() { MyApp.ExecuteOnUI(delegate() { CenterForm.BeginAnimation(RotateTransform.AngleProperty, null); }); }
public void StartRotateAnim(double secRotateTime = 0.75) { MyApp.ExecuteOnUI(delegate() { var anim = new DoubleAnimation(0, 360, new Duration(TimeSpan.FromSeconds(secRotateTime))); anim.RepeatBehavior = RepeatBehavior.Forever; CenterForm.BeginAnimation(RotateTransform.AngleProperty, anim); }); }