#region 实现复杂的移动 --- 移动过程中出现转折点
DoubleAnimationUsingKeyFrames DakX = new DoubleAnimationUsingKeyFrames();
DoubleAnimationUsingKeyFrames DakY = new DoubleAnimationUsingKeyFrames();
//设置动画时长
DakY.Duration = new Duration(TimeSpan.FromMilliseconds(900));
DakX.Duration = new Duration(TimeSpan.FromMilliseconds(900));
//创建、添加关键帧
LinearDoubleKeyFrame y1 = new LinearDoubleKeyFrame();
LinearDoubleKeyFrame y2 = new LinearDoubleKeyFrame();
LinearDoubleKeyFrame y3 = new LinearDoubleKeyFrame();
y1.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(300));
y1.Value = 0;
y2.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(600));
y2.Value = 180;
y3.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(900));
y3.Value = 180;
LinearDoubleKeyFrame x1 = new LinearDoubleKeyFrame();
LinearDoubleKeyFrame x2 = new LinearDoubleKeyFrame();
LinearDoubleKeyFrame x3 = new LinearDoubleKeyFrame();
x1.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(300));
x1.Value = 200;
x2.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(600));
x2.Value = 0;
x3.KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(900));
x3.Value = 200;
DakY.KeyFrames.Add(y1);
DakY.KeyFrames.Add(y2);
DakY.KeyFrames.Add(y3);
DakX.KeyFrames.Add(x1);
DakX.KeyFrames.Add(x2);
DakX.KeyFrames.Add(x3);
//执行动画
this.tt.BeginAnimation(TranslateTransform.XProperty, DakX);
this.tt.BeginAnimation(TranslateTransform.YProperty, DakY);
#endregion