question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Proposal] Animation Behavior

See original GitHub issue

Animation Behavior

Summary

AnimationBehavor is a Behavior that can be attached to any VisualElement, allowing developers to trigger the following animations via ICommand AnimateCommand:

  • #519
  • FlipHorizontalAnimation
  • FlipVerticalAnimation
  • RotateAnimation
  • ScaleAnimation
  • ShakeAnimation

Motivation

AnimationBehavior solves the following challenges:

  • Animations are not easily accomplished in XAML
  • Animations are not easily accomplished using ICommand

Following the implementation of AnimationBehavior, developers will easily be able to create bindable animations for any VisualElement

Detailed Design

AnimationBehavior.shared.cs

AnimationBehavior is a Behavior can be attached to any VisualElement.

AnimationBehavior implements EventToCommandBehavior.

public class AnimationBehavior : EventToCommandBehavior
{
    public static readonly BindableProperty AnimationTypeProperty;
    public static readonly BindableProperty AnimateCommandProperty;

    public AnimationBase? AnimationType { get; set; }
    public ICommand AnimateCommand { get; }
}

AnimationBase<TView>

AnimationBase is an abstract class implementing BindableObject that allows for creating animations.

public abstract class AnimationBase<TView> : BindableObject where TView : View
{
    public static readonly BindableProperty DurationProperty;
    public static readonly BindableProperty EasingTypeProperty

    public uint Duration { get; set; }
    public Easing Easing { get; set; }

    public abstract Task Animate(TView? view);
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bijingtoncommented, May 31, 2022

Hi @bijington, I’ve unassigned myself so go for it!

Thank you and thanks for all the hard work in getting it to this stage it really is appreciated!

0reactions
stefanbogaard86commented, May 31, 2022

Hi @bijington, I’ve unassigned myself so go for it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Proposal] ProgressBar Animation Behavior · Issue #48
A behavior that animates a ProgressBar based on double AnimateProgress . Detailed Design. ProgressBarAnimationBehavior.shared.cs. public class ...
Read more >
Animation Proposal - 10+ Examples, Format, Pdf
Learn how to compose an animation proposal by reading this article. ... Before starting to animate your motion picture, you should first conduct...
Read more >
Free Animation Project Proposal Template
Customize and download any of Bonsai's animation proposal sample templates. ... The Coach agrees to maintain the ethics and standards of behavior ......
Read more >
Advanced CSS Transitions & Animations Proposal
It can appear that the animation is fired by the element entering some state, but that's an illusion; there is no state-changing behavior...
Read more >
A Modest Proposal for CSS3 Animations
I propose that the CSS3 Animation specification be changed to allow for this. Keyframes should act like classes being applied to an element....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found