21 July, 2011

WP7: My scrollviewer doesn’t work!

If you ever find yourself wondering why your ScrollViewer does not kick in (as I was wondering!); you have most likely forgotten what I did.

You need to set the height and width of the scrollviewer explicitly to make it work.


controls:PivotItem Header="legal">
ScrollViewer Width="460" Height="700">
StackPanel x:Name="stkPnl"/>

The size of this control (ScrollViewer) is simply a “window” to your data that allows you to scroll the content of this window. Due to this reason – you need to tell WP7 that it should only display a fixed window of data to the User.

StackOverflow Tags:

1 comment:

Depechie said...

Did you see this? Maybe it could help with your scrollviewer problem...


iPhone/XCode - not all cases are equal!

This bit me! Having made some changes to an iPhone application (Obj-C); everything worked fine in the simulator. But, when deploying the s...