Question

I am building a Windows Phone 7 app with Silverlight and am having a problem with some ListBoxes. They only scroll slightly and then return to original position when I attempt to scroll to bottom of list. Some ListBoxes work fine. Others do not. Those that don't work are generally more complex.

For example, one scenario is I want a ListBox of search results and a button at the bottom of the list to get more results. The more button should only be visible by scrolling to the bottom of the ListBox.

Was it helpful?

Solution

In a more complex scenario, like the one you describe with the button at the bottom, you don't want the ListBox to do the scrolling. You probably have a Grid or a StackPanel containing the ListBox and the button.

Turn off the scrolling of the ListBox (set VerticalScrollbarVisibility to Disabled). Then group everything that needs to be scrolled (probably the Grid or StackPanel) into a ScrollViewer and set its VerticalScrollbarVisibility to Auto. Furthermore, make sure that the ScrollViewer's size fits on the screen.

OTHER TIPS

This will happen when you've configured your listbox so large it doesnt need to scroll the contents. Probably larger than the display if you expecting there to be more contents than fit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top