简体   繁体   中英

How can I speed up the animations when using FluidKit?

I've using FluidKit in a WPF application and would like to speed up the animations.

SlideTransition slideTransition = Resources["SlideTransition"] as SlideTransition;
slideTransition.Direction = Direction.LeftToRight;
slideTransition.Duration = new Duration(new System.TimeSpan(1000)); //does not work
TransitionContainer.Transition = slideTransition;

It has a "Duration" property which is of type Duration which expects a TimeSpan, but any timespan I give it just causes there to be no animation.

How can I set a duration to control the speed of the animation?

(If anyone is looking for answers to this, I also posted it on the codeplex forum.)

这有效:

slideTransition.Duration = TimeSpan.FromMilliseconds(200);

The TimeSpan constructor invoked in your example is the one taking a long , which corresponds to ticks. A time span tick unit represents 100-nanosecond. You're effectively starting an animation during 100 microseconds, which is why you're seeing no animation at all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM