12 instantiations of Easing
Microsoft.Maui (12)
Animations\Easing.cs (12)
26 public static readonly Easing Linear = new(x => x); 31 public static readonly Easing SinOut = new(x => Math.Sin(x * Math.PI * 0.5f)); 36 public static readonly Easing SinIn = new(x => 1.0f - Math.Cos(x * Math.PI * 0.5f)); 41 public static readonly Easing SinInOut = new(x => -Math.Cos(Math.PI * x) / 2.0f + 0.5f); 46 public static readonly Easing CubicIn = new(x => x * x * x); 51 public static readonly Easing CubicOut = new(x => Math.Pow(x - 1.0f, 3.0f) + 1.0f); 56 public static readonly Easing CubicInOut = new(x => x < 0.5f ? Math.Pow(x * 2.0f, 3.0f) / 2.0f : (Math.Pow((x - 1) * 2.0f, 3.0f) + 2.0f) / 2.0f); 71 public static readonly Easing SpringIn = new(x => x * x * ((1.70158f + 1) * x - 1.70158f)); 76 public static readonly Easing SpringOut = new(x => (x - 1) * (x - 1) * ((1.70158f + 1) * (x - 1) + 1.70158f) + 1); 82 BounceOut = new Easing(p => 105 BounceIn = new Easing(p => 1.0f - BounceOut.Ease(1 - p)); 135 return new Easing(func);
56 references to Easing
Microsoft.Maui (23)
Animations\Animation.cs (4)
30 public Animation(Action<double> callback, double start = 0.0f, double duration = 1.0f, Easing? easing = null, Action? finished = null) 35 Easing = easing ?? Easing.Default; 101 public Easing Easing { get; set; } = Easing.Default;
Animations\Easing.cs (14)
21 public static Easing Default => CubicInOut; 26 public static readonly Easing Linear = new(x => x); 31 public static readonly Easing SinOut = new(x => Math.Sin(x * Math.PI * 0.5f)); 36 public static readonly Easing SinIn = new(x => 1.0f - Math.Cos(x * Math.PI * 0.5f)); 41 public static readonly Easing SinInOut = new(x => -Math.Cos(Math.PI * x) / 2.0f + 0.5f); 46 public static readonly Easing CubicIn = new(x => x * x * x); 51 public static readonly Easing CubicOut = new(x => Math.Pow(x - 1.0f, 3.0f) + 1.0f); 56 public static readonly Easing CubicInOut = new(x => x < 0.5f ? Math.Pow(x * 2.0f, 3.0f) / 2.0f : (Math.Pow((x - 1) * 2.0f, 3.0f) + 2.0f) / 2.0f); 61 public static readonly Easing BounceOut; 66 public static readonly Easing BounceIn; 71 public static readonly Easing SpringIn = new(x => x * x * ((1.70158f + 1) * x - 1.70158f)); 76 public static readonly Easing SpringOut = new(x => (x - 1) * (x - 1) * ((1.70158f + 1) * (x - 1) + 1.70158f) + 1); 109 /// Creates a new <see cref="Easing" /> object with the <paramref name="easingFunc" /> function. 133 public static implicit operator Easing(Func<double, double> func)
Animations\LerpingAnimation.cs (1)
26 public LerpingAnimation(Action<double> callback, double start = 0, double end = 1, Easing? easing = null, Action? finished = null)
Converters\EasingTypeConverter.cs (4)
4using static Microsoft.Maui.Easing; 30 if (parts.Length == 2 && Compare(parts[0], nameof(Easing))) 46 _ => throw new InvalidOperationException($"Cannot convert \"{strValue}\" into {typeof(Easing)}") 55 if (value is not Easing easing)
Microsoft.Maui.Controls (30)
Animation.cs (5)
21 Easing = Easing.Linear; 32 public Animation(Action<double> callback, double start = 0.0f, double end = 1.0f, Easing easing = null, Action finished = null) : base(callback, start, end - start, easing, finished) 35 Easing = easing ?? Easing.Linear; 71 public void Commit(IAnimatable owner, string name, uint rate = 16, uint length = 250, Easing easing = null, Action<double, bool> finished = null, Func<bool> repeat = null) 151 public Animation WithConcurrent(Action<double> callback, double start = 0.0f, double end = 1.0f, Easing easing = null, double beginAt = 0.0f, double finishAt = 1.0f)
AnimationExtensions.cs (9)
71 Easing = Easing.Linear, 92 Easing = Easing.Linear, 136 public static void Animate(this IAnimatable self, string name, Animation animation, uint rate = 16, uint length = 250, Easing easing = null, Action<double, bool> finished = null, 155 public static void Animate(this IAnimatable self, string name, Action<double> callback, double start, double end, uint rate = 16, uint length = 250, Easing easing = null, 162 public static void Animate(this IAnimatable self, string name, Action<double> callback, uint rate = 16, uint length = 250, Easing easing = null, Action<double, bool> finished = null, 171 uint rate = 16, uint length = 250, Easing easing = null, 256 uint rate, uint length, Easing easing, Action<T, bool> finished, Func<bool> repeat) 267 var info = new Info { Rate = rate, Length = length, Easing = easing ?? Easing.Linear, AnimationManager = animationManager }; 393 public Easing Easing { get; set; }
BindableProperty.cs (1)
46 { typeof(Easing), new Maui.Converters.EasingTypeConverter() },
ProgressBar\ProgressBar.cs (1)
42 public Task<bool> ProgressTo(double value, uint length, Easing easing)
ViewExtensions.cs (14)
39 Action<VisualElement, double> updateAction, uint length = 250, Easing? easing = null) 42 easing = Easing.Linear; 71 public static Task<bool> FadeTo(this VisualElement view, double opacity, uint length = 250, Easing? easing = null) 89 public static Task<bool> LayoutTo(this VisualElement view, Rect bounds, uint length = 250, Easing? easing = null) 117 public static Task<bool> RelRotateTo(this VisualElement view, double drotation, uint length = 250, Easing? easing = null) 135 public static Task<bool> RelScaleTo(this VisualElement view, double dscale, uint length = 250, Easing? easing = null) 153 public static Task<bool> RotateTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 171 public static Task<bool> RotateXTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 189 public static Task<bool> RotateYTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 206 public static Task<bool> ScaleTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 224 public static Task<bool> ScaleXTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 242 public static Task<bool> ScaleYTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 261 public static Task<bool> TranslateTo(this VisualElement view, double x, double y, uint length = 250, Easing? easing = null) 266 easing ??= Easing.Linear;
Microsoft.Maui.Controls.Build.Tasks (3)
CompiledConverters\EasingTypeConverter.cs (3)
22 if (parts.Length == 2 && parts[0] == nameof(Easing)) 25 var assemblyTypeInfo = ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", nameof(Easing)); 36 throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(Easing));