Listbox that when you reach the end it goes back to the beginning
- by Roy
Hi,
Is there a way to make a Listbox go back to the beginning of the list once a user scrolls all the way to the end of list?
Current aspx code:
<ListBox x:Name="listbox">
<ListBox.ItemTemplate>
<DataTemplate>
<Image Name="imgSource" Source="{Binding Path=Url}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Current code behind code:
public class ImageScroller
{
public string Url { get; set; }
}
public MainPage()
{
InitializeComponent();
LoadImages();
}
void LoadImages()
{
listbox.ItemsSource = new List<ImageScroller>
{
new ImageScroller
{
Url = "images/Chrysanthemum.jpg"
},
new ImageScroller
{
Url = "images/Desert.jpg"
},
new ImageScroller
{
Url = "images/Hydrangeas.jpg"
},
};
}
Thanks for your help!