This question is locked. New answers and comments are not allowed.
Hi,
I am using a horizontal looping listbox to show images in my app.
The phones screen limits the number of images shown at anyone time to just three which is fine. I have 8 images in total.
The problem is, the looping list only seems to load the first 4 images and then repeats these for the next four. i.e. it will show images 0,1,2,3,0,1,2,3 instead of 0,1,2,3,4,5,6,7
I have checked and all images are set to content and copy if newer.
Here is my code:
My images are names 0.png - 7.png
Can anyone help?
I am using a horizontal looping listbox to show images in my app.
The phones screen limits the number of images shown at anyone time to just three which is fine. I have 8 images in total.
The problem is, the looping list only seems to load the first 4 images and then repeats these for the next four. i.e. it will show images 0,1,2,3,0,1,2,3 instead of 0,1,2,3,4,5,6,7
I have checked and all images are set to content and copy if newer.
Here is my code:
ds =
New LoopingListDataSource(8)
AddHandler ds.ItemNeeded, AddressOf ds_ItemNeeded
AddHandler ds.ItemUpdated, AddressOf ds_ItemUpdated
loopingList.DataSource = ds
' // Looping List Item Updated
Private Sub ds_ItemUpdated(sender As Object, e As LoopingListDataItemEventArgs)
DirectCast(e.Item, MyImage).Uri = "/Icons/Select/" + e.Index.ToString + ".png"
End Sub
' // Looping List Item Needed
Private Sub ds_ItemNeeded(sender As Object, e As LoopingListDataItemEventArgs)
Dim img As MyImage = New MyImage
img.Uri =
"/Icons/Select/" + e.Index.ToString + ".png"
e.Item = img
End Sub
My images are names 0.png - 7.png
Can anyone help?