I'm building an app with Silverlight for WP7. I have a ListBox
in a PivotItem
with some content. I would like the ListBox
to scroll to display all content. Unfortunately, the user can't scroll down all the way - the last items are cut off.
Here is the XAML:
<controls:Pivot Title="SECTIONS" x:Name="pivotControl" ItemsSource="{Binding SectionViewModels}">
<controls:Pivot.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DisplayName}" />
</DataTemplate>
</controls:Pivot.HeaderTemplate>
<controls:Pivot.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Style="{StaticResource disabledText}" Visibility="{Binding NoStoryContent}">
Content could not be downloaded from MySite.com. Do you have a network connection?
</TextBlock>
<!-- fake data to demonstrate -->
<ListBox FontSize="100">
<ListBoxItem Content="A" />
<ListBoxItem Content="B" />
<ListBoxItem Content="C" />
<ListBoxItem Content="D" />
<ListBoxItem Content="E" />
<!-- the user can scroll no lower than the top half of the 'F' -->
<ListBoxItem Content="F" />
<ListBoxItem Content="G" />
</ListBox>
</StackPanel>
</DataTemplate>
</controls:Pivot.ItemTemplate>
</controls:Pivot>
Aside from the scrolling issue, everything else looks/works fine with this control.
What could I be doing wrong?
Update: It works fine if I explicitly specify the height.