I am having trouble getting my long list selector to work properly. When the list is taller than the screen, the long list selector stays static and I am unable to scroll to see all of the items.
Any thoughts?
<phone:PivotItem Header="{Binding Path=LocalizedResources.ApplicationsHeader, Source={StaticResource LocalizedStrings}}" x:Name="applicationsPivotItem">
<Grid x:Name="applications" Grid.Row="1">
<phone:LongListSelector x:Name="MainLongListSelector" ItemsSource="{Binding Items}" SelectionChanged="MainLongListSelector_SelectionChanged">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
<TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
</Grid>
</phone:PivotItem>
Fix the Height of the Grid
<Grid x:Name="applications" Grid.Row="1" Height="400">
...long list code...
</Grid>
I had a similar issue where my panoramaItem was defines as below:
<phone:PanoramaItem>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<phone:LongListSelector x:Name="SpeciesList" Grid.Row="0">
<phone:LongListSelector.ItemTemplate>
<DataTemplate>
<StackPanel Margin="0,-6,0,12">
<TextBlock Text="{Binding PrimaryName}"/>
</StackPanel>
</DataTemplate>
</phone:LongListSelector.ItemTemplate>
</phone:LongListSelector>
</Grid>
</phone:PanoramaItem>
By changing the RowDefinition to use * instead of Auto, my scrolling issues was resolved! As shown below.
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With