private void setTimer()
{
DispatcherTimer dt = new DispatcherTimer();
dt.Interval = TimeSpan.FromSeconds(5);
dt.Tick += delegate
{
if (index == 0)
homepageimage.Source = listOfImages[index];
else if (index < listOfImages.Count)
{
homepageimage.Source = listOfImages[index];
}
else
index = -1;
++index;
this.fadeIn.Begin();
};
dt.Start();
}
Their are a total of 5 images in listOfImages.But while displaying it shows only 3 images.I have debugged the code and according to that it is it should show all 5.I don't know why this code is not working as expected.