.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Articles >> WPF >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Create WPF Image SlideShow : Part IV

Posted By:Diptimaya Patra       Posted Date: May 22, 2010    Points: 25    Category: WPF    URL: http://www.dotnetspark.com  

Create WPF Image SlideShow : Part IV. In this article we will see how we can loop through the Image List and display it in ListBox.


In part III of this article series we have seen the Window Transparency and it's FullScreen View. We have seen how we can achieve Tooltip as the small Image Preview of the Mouse Hovered Image. In this article we will see how we can loop through the Image List and display it in ListBox.

You can also read Part I and Part II of this series.

To start with let me explain how I am using the List. I am having a Global List that will be refreshed each time a new item is added or an existing item is updated.

The following Global List is kept inside a Class. So that it can be accessed for other windows.


Now we can have the LINQ query to have SKIP and TAKE set of records. Such as:


As you see in above code display, I have used a variable count. This variable is initialized as 0.

When we Click on Next Button we are making an increment and in Previous Button Click we are making a decrement.

Now we will have our Previous and Next Button Click events.


As the number of images displayed in the ListBox is always 10, we have to use the above logic to take the List.

Count * 10 is the number of records to be Skipped and next 10 records are to be taken for display.

Now the last tiny thing left is on SelectionChanged event of the ListBox we need to display the Image in large.


The following screenshot is the final SlideShow.


So we have successfully created the Slide Show. I will post the Source Code once the application is full fledged.

You can also download the sample project used in above example below

Hope you like this article series.

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend