Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Create Image Carousel
2 replies. Latest Post by Yi-Lun Luo - MSFT on July 28, 2008.
(0)
quanghoc
Member
18 points
59 Posts
07-24-2008 3:03 PM |
I try to copy the same effect as on www.emc.com (choose your location first) for the photo Carousel on the front page. What is the best approach for this? I drew 5 <Path > as each path as a slide. But how to go about the movement. Is there a way to draw invisible line and attach each <Path> to it to move. My animation knowledge of Silverlight is limited. How would it be different from this one: http://www.nikhilk.net/SilverlightCarousel1.aspx ?
Any guidance is helpful. Thanks.
Simbalight
245 points
87 Posts
07-25-2008 8:37 AM |
To animate your items use DoubleAnimation (probably with keyframes) to Animate the Canvas.Left, Canvas.Top properties (alternatively use TranslateTransform). The same you can do with the Width and Height properties (or use ScaleTransform instead). You should also adapt the Canvas.ZIndex property at the correct time.
I would recommend you to download the Silverlight Documentation for Beta 2. It contains only SL2 relevant stuff and shows you how to set up and use animations step by step.
Yi-Lun L...
All-Star
25052 points
2,747 Posts
07-28-2008 4:15 AM |
Hello, if you need complex movement, I'm afraid Storyboard is incapable of that... Currently motion path is not supported. You'll have to write code to move the objects with some math tricks. This is how carousels and page turns are done. Here's a video showing you how to create a basic carousel.