简体   繁体   中英

TranslateTransform.BeginAnimation in Silverlight?

I have a working WPF application that would like to port to SilverLight. I have a piece of WPF code that I haven't found a way to mimic in SilverLight.

WPF Code Snippet:

TranslateTransform trans = null;

trans = child.RenderTransform as TranslateTransform;

trans.BeginAnimation(TranslateTransform.XProperty, new DoubleAnimation(curX, animationLength), HandoffBehavior.Compose);

The problem is the BeginAnimation call. it doesn't appear to exist on the TranslateTransform object. Any ideas how I can accomplish the same thing?

BeginAnimation doesn't exist in Silverlight. You could use a Storyboard instead

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