Xamanimation icon indicating copy to clipboard operation
Xamanimation copied to clipboard

c# documentation request for simple things

Open tdbe opened this issue 5 years ago • 0 comments

Hi, this plugin looks great but I have no idea how am I supposed to use your API to call an animation in C#. Please provide examples.

On this page all you say is we can do myElement.Animate(new FadeOutAnimation()); How do I define how long it lasts? How do I pass in a callback Action for when it is done animating so I can disable myElement?

Your other AnimationExtensions overloads are super confusing as well:

  • string name? what's the name? why do I need to come up with one by default?
  • second param takes Animation but not Xamanimation.Animation??? How do I say start a xamanimation FadeOutAnimation then??
  • finished callback is an Action<double,bool>?? What does it need a double and a bool? What are those parameters for? I just want to run an arbitrary action when the animation is done.
  • repeat is a Func?? Bool? What does that mean? Shouldn't it be an int howManyTimes with 0 being infinite and -1 false?

So okay back to trying FadeOutAnimation(), let's try to give it a length and find if it has an OnFinished callback or make my own..:

  • Xamanimation.AnimationBase anim = new FadeOutAnimation(); Then I try to do anim.Duration = 1; What? It's a string? Why??? What do I write there? Milliseconds? Format? Am I even supposed to use this or is it for something else?
  • Callbacks? No callbacks.

I've never been more confused. Please provide some kind of explanation for what you're providing here.

tdbe avatar Jun 09 '20 12:06 tdbe