Skip to content

Commit

Permalink
Added BoolTransition (#16941)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbriard authored Sep 12, 2024
1 parent dbbb6d1 commit 39f4360
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Avalonia.Base/Animation/Transitions/BoolTransition.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Avalonia.Animation.Animators;

namespace Avalonia.Animation
{
/// <summary>
/// Transition class that handles <see cref="AvaloniaProperty"/> with <see cref="bool"/> types.
/// </summary>
public class BoolTransition : Transition<bool>
{
internal override IObservable<bool> DoTransition(IObservable<double> progress, bool oldValue, bool newValue) =>
AnimatorDrivenTransition<bool, BoolAnimator>.Transition(Easing, progress, oldValue, newValue);
}
}

0 comments on commit 39f4360

Please sign in to comment.