我有一个“Toast”WPF窗口从屏幕右下角滑入 - 如何添加 轻松弹回一点反弹
var anim = new DoubleAnimation
{
Duration = TimeSpan.FromMilliseconds(280),
From = Left,
To = Left - (Width * 2),
};
this.BeginAnimation(Window.LeftProperty, anim);
答案 0 :(得分:0)
var anim = new DoubleAnimation
{
Duration = TimeSpan.FromMilliseconds(280),
From = Left,
To = Left - (Width * 2),
EasingFunction = new BounceEase()
};
DoubleAnimation Class (System.Windows.Media.Animation) - MSDN
Easing Functions - MSDN