I am developing wp 8.1 app. I have a stack panel whose contents have to be added dynamically and scrolled vertically. For this, I am using Scroll Viewer outside the stack panel. Contents are scrolling fine. But, My problem is that after the last content, When I scroll, the stack panel itself get scrolled. How to prevent the stack panel to get scrolled.
Thanks in advance.
Set the StackPanel.VerticalAlignment to Stretch and set fixed size to the parent ScrollViewer. This is necessary - the ScrollViewer must know its size, to show the scrollbars for the inner content when the inner content is too long. Otherwise It will scroll end of the control and as well as control.