Showing posts with label Beginners. Show all posts
Showing posts with label Beginners. Show all posts

Sunday, January 17, 2010

Slide Show in Silverlight


When my friends come and ask me how to start with Silverlight, I always point them to http://silverlight.net/ But when they ask me to give them some kind of a task so that they can have hands on, then I always tell them to make a simple slide show. Slide show is a thing which is very easy and which can be made equally complex. I find that from the making of this simple show to its conversion to a complex carousel, we get to learn Silverlight and in turn gain confidence over it.


For a beginner it’s always good to start with some static images put in some layout element, when we explore further to see what will be the best container for a stack of images we in turn explore different layouts. Then to make things look better and to add a Silverlight touch to it, I tell them to add little animations on mouse over and out events. Then I tell them to add few buttons and control the slide show using them. By now they ask me how they can do the entire thing dynamically. Then a series of events and changes are done on the same old slide show and in the end a wonderful carousel is made. If you are a beginner in Silverlight then I would suggest you to start learning it by making a slide show. People have made thousands of slide shows but each has a different touch. Here is my version for you to start with.


In this I am locally maintaining an XML that has links to images of some cute dogs. I am reading this xml and then displaying them in the age old filmstrip fashion. To read the xml I have used Linq. The slide show is controlled by a pair of forward and backward buttons.







So, now when everything is all set, why don’t you Download Source Code and get started!