Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to use bool AnimationIsRunning(this IAnimatable self, string handle), or what should handle be?

$
0
0

Hi,

I have a visual element (ie. Entry), that does some animation on a button click.
If I spam the button, it works, but eventually crashes the application (saying key doesn't exist in dictionary), I rate its because the animation is still running or something.

so I decide to add an if to check if the animation is running (Note: I have no idea what the handle must be, so I use something)

if(!entry.AnimationIsRunning("something"))
{
}

This always returns false, thus executing my animation again.
What should handle be?

Also, the documentation isn't of much help either (no example, or what handle should be), along with the hint in Visual Studio saying "handle: To be added". :(

Edit
I found this remark on the AbortAnimation (still blank though)

// Remarks:
// If handle refers to an animation that belongs to this Xamarin.Forms.IAnimatable
// instance, then its tweener handlers are removed, the tweener is stopped,
// the animation is removed from this Xamarin.Forms.IAnimatable instance, and
// it is marked as finished. If handle refers to one of the kinetics that belong
// to this Xamarin.Forms.IAnimatable instance, then it and its ticker are removed.
public static bool AbortAnimation(this IAnimatable self, string handle);


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>