Making an Image SlideShow in WPF: Part IV

Introduction

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.

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.

image1.gif

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

image2.gif

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

When we Click on Next Button we are making an increament and in Previous Button Click we are making a decreament.

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

image3.gif

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 ListBoc we need to display the Image in large.

image4.gif

The following screenshot is the final SlideShow.

image5.gif

So we have successfully created the SlideShow. I will post the Source Code once the application is full fledge.

Hope you like this article series.