This question is locked. New answers and comments are not allowed.
Hello,
I have had good luck with loopinglist in most regards, but a couple behaviour anomolies have cropped up. In one case, i have created a horizontal, text-based loopinglist with 10 items. The user can select items first and the selection is verified in code and the selection stashed in isolated storage with no issue. The user then can leave the page to add another item or go to the settings page, for example. Inmy loop, 3 items are on screen at any given time. Upon return i call up the selected item and rebuild the looping list and 'seed' src.ItemNeeded with selectedItem-2, selectedItem-1, and selectedItem and set loop.SelectedIndex=selectedItem. This seems to work to get the page reloaded and the loop in the right spot and correct item selected. And in fact this does work for all my items except the 2nd item in the list (i.e.item[1]). When this item was the selected item and we return to the page, the display selects the [0] item and doesn't center the loop items as it does the rest of them.
Here's the code to 'seed' the ItemNeeded. labelLocations is location in array so [0-9]. locationListItemCount is the toal number of items in the list, so 10. So if i selected item [1], then labelLocations would start at [9] then go to [0], then [1]. This seems to center item [1] on the loop.
I have had good luck with loopinglist in most regards, but a couple behaviour anomolies have cropped up. In one case, i have created a horizontal, text-based loopinglist with 10 items. The user can select items first and the selection is verified in code and the selection stashed in isolated storage with no issue. The user then can leave the page to add another item or go to the settings page, for example. Inmy loop, 3 items are on screen at any given time. Upon return i call up the selected item and rebuild the looping list and 'seed' src.ItemNeeded with selectedItem-2, selectedItem-1, and selectedItem and set loop.SelectedIndex=selectedItem. This seems to work to get the page reloaded and the loop in the right spot and correct item selected. And in fact this does work for all my items except the 2nd item in the list (i.e.item[1]). When this item was the selected item and we return to the page, the display selects the [0] item and doesn't center the loop items as it does the rest of them.
Here's the code to 'seed' the ItemNeeded. labelLocations is location in array so [0-9]. locationListItemCount is the toal number of items in the list, so 10. So if i selected item [1], then labelLocations would start at [9] then go to [0], then [1]. This seems to center item [1] on the loop.
src.ItemNeeded += (sender2, args) =>
{
args.Item =
new LoopingListDataItem(locationListItem[labelLocations]);
labelLocations++;
if (labelLocations > (locationListItemCount - 1)) { labelLocations = (locationListItemCount - labelLocations); }//wrap past array size logic
};