Ok ,this is going to sound silly, but I can't get the ScrollViewer to work properly. What I need to do is
Have a silverlight page use 100% width/height of the HTML page
Have a Height=160px control on the top part of the Sliverlight page, then have the rest (100% - 160px) be a ScrollViewer with dynamically changing content.
so in the HTML page I have:
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
then in the XAML :
<Grid x:Name="LayoutRoot" Height="Auto">
<StackPanel Orientation="Vertical" Height="Auto">
<App:ASilverlightControl x:Name="Header" Height="160"/>
<ScrollViewer Name="svw" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible" Height="Auto" >
<StackPanel Orientation="Vertical" x:Name="DynamicContentHere">
</StackPanel>
</ScrollViewer>
</StackPanel>
</Grid>
Now, no matter what I try, the ScrollViewer will alway expand/contract to contain all elements in the StackPanel, even if that means overflowing under the screen but no vertical scrollbar.
The only way I can get this to work is to set Height=800 to the ScrollViewer.